{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "c3d8df22",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2.6.0\n"
     ]
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import tensorflow as tf\n",
    "import scipy.linalg\n",
    "import os\n",
    "import scipy.optimize as opt\n",
    "\n",
    "print(tf.__version__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "644434d0",
   "metadata": {},
   "outputs": [],
   "source": [
    "file = \"datasets/MNIST_Data\"\n",
    "mnist= tf.keras.datasets.fashion_mnist\n",
    "(train_images, train_labels),(test_images, test_labels) = mnist.load_data()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "9eecc476",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train_images.shape: (60000, 28, 28) \n",
      "train_labels.shape (60000,)\n",
      "test_images.shape: (10000, 28, 28) \n",
      "test_labels.shape (10000,)\n"
     ]
    }
   ],
   "source": [
    "# 10000条 28*28像素的黑白图像 784个象征点\n",
    "\n",
    "print(\"train_images.shape:\",train_images.shape,\"\\ntrain_labels.shape\",train_labels.shape)\n",
    "print(\"test_images.shape:\",test_images.shape,\"\\ntest_labels.shape\",test_labels.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "76918a24",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train_images[1] [[  0   0   0   0   0   1   0   0   0   0  41 188 103  54  48  43  87 168\n",
      "  133  16   0   0   0   0   0   0   0   0]\n",
      " [  0   0   0   1   0   0   0  49 136 219 216 228 236 255 255 255 255 217\n",
      "  215 254 231 160  45   0   0   0   0   0]\n",
      " [  0   0   0   0   0  14 176 222 224 212 203 198 196 200 215 204 202 201\n",
      "  201 201 209 218 224 164   0   0   0   0]\n",
      " [  0   0   0   0   0 188 219 200 198 202 198 199 199 201 196 198 198 200\n",
      "  200 200 200 201 200 225  41   0   0   0]\n",
      " [  0   0   0   0  51 219 199 203 203 212 238 248 250 245 249 246 247 252\n",
      "  248 235 207 203 203 222 140   0   0   0]\n",
      " [  0   0   0   0 116 226 206 204 207 204 101  75  47  73  48  50  45  51\n",
      "   63 113 222 202 206 220 224   0   0   0]\n",
      " [  0   0   0   0 200 222 209 203 215 200   0  70  98   0 103  59  68  71\n",
      "   49   0 219 206 214 210 250  38   0   0]\n",
      " [  0   0   0   0 247 218 212 210 215 214   0 254 243 139 255 174 251 255\n",
      "  205   0 215 217 214 208 220  95   0   0]\n",
      " [  0   0   0  45 226 214 214 215 224 205   0  42  35  60  16  17  12  13\n",
      "   70   0 189 216 212 206 212 156   0   0]\n",
      " [  0   0   0 164 235 214 211 220 216 201  52  71  89  94  83  78  70  76\n",
      "   92  87 206 207 222 213 219 208   0   0]\n",
      " [  0   0   0 106 187 223 237 248 211 198 252 250 248 245 248 252 253 250\n",
      "  252 239 201 212 225 215 193 113   0   0]\n",
      " [  0   0   0   0   0  17  54 159 222 193 208 192 197 200 200 200 200 201\n",
      "  203 195 210 165   0   0   0   0   0   0]\n",
      " [  0   0   0   0   0   0   0  47 225 192 214 203 206 204 204 205 206 204\n",
      "  212 197 218 107   0   0   0   0   0   0]\n",
      " [  0   0   0   0   1   6   0  46 212 195 212 202 206 205 204 205 206 204\n",
      "  212 200 218  91   0   3   1   0   0   0]\n",
      " [  0   0   0   0   0   1   0  11 197 199 205 202 205 206 204 205 207 204\n",
      "  205 205 218  77   0   5   0   0   0   0]\n",
      " [  0   0   0   0   0   3   0   2 191 198 201 205 206 205 205 206 209 206\n",
      "  199 209 219  74   0   5   0   0   0   0]\n",
      " [  0   0   0   0   0   2   0   0 188 197 200 207 207 204 207 207 210 208\n",
      "  198 207 221  72   0   4   0   0   0   0]\n",
      " [  0   0   0   0   0   2   0   0 215 198 203 206 208 205 207 207 210 208\n",
      "  200 202 222  75   0   4   0   0   0   0]\n",
      " [  0   0   0   0   0   1   0   0 212 198 209 206 209 206 208 207 211 206\n",
      "  205 198 221  80   0   3   0   0   0   0]\n",
      " [  0   0   0   0   0   1   0   0 204 201 205 208 207 205 211 205 210 210\n",
      "  209 195 221  96   0   3   0   0   0   0]\n",
      " [  0   0   0   0   0   1   0   0 202 201 205 209 207 205 213 206 210 209\n",
      "  210 194 217 105   0   2   0   0   0   0]\n",
      " [  0   0   0   0   0   1   0   0 204 204 205 208 207 205 215 207 210 208\n",
      "  211 193 213 115   0   2   0   0   0   0]\n",
      " [  0   0   0   0   0   0   0   0 204 207 207 208 206 206 215 210 210 207\n",
      "  212 195 210 118   0   2   0   0   0   0]\n",
      " [  0   0   0   0   0   1   0   0 198 208 208 208 204 207 212 212 210 207\n",
      "  211 196 207 121   0   1   0   0   0   0]\n",
      " [  0   0   0   0   0   1   0   0 198 210 207 208 206 209 213 212 211 207\n",
      "  210 197 207 124   0   1   0   0   0   0]\n",
      " [  0   0   0   0   0   0   0   0 172 210 203 201 199 204 207 205 204 201\n",
      "  205 197 206 127   0   0   0   0   0   0]\n",
      " [  0   0   0   0   0   0   0   0 188 221 214 234 236 238 244 244 244 240\n",
      "  243 214 224 162   0   2   0   0   0   0]\n",
      " [  0   0   0   0   0   1   0   0 139 146 130 135 135 137 125 124 125 121\n",
      "  119 114 130  76   0   0   0   0   0   0]]\n"
     ]
    }
   ],
   "source": [
    "print(\"train_images[1]\",train_images[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "b3286540",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train_labels[1] 0\n"
     ]
    }
   ],
   "source": [
    "print(\"train_labels[1]\",train_labels[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "6c19dc77",
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_image(image):\n",
    "    plt.imshow(image.reshape(28,28),cmap = 'binary')\n",
    "    #plt.imshow(M,N, 3)\n",
    "    plt.show()\n",
    "    \n",
    "def plot_image_org(image):\n",
    "    plt.imshow(image,cmap = 'binary')\n",
    "    #plt.imshow(M,N, 3)\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "5dd3a592",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPsAAAD4CAYAAAAq5pAIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAARqklEQVR4nO3dXYyV5bUH8P8SGEAG+ZBxHAQPlUCiaApkZzyxpPGkOUW5AW5Iuaic2EgvJGkNiTV6UW9OokbaU5MjkSopPVZLo+WIiTnBgxBsNI0bBAHhOGjQCgjDt8g3rHMxL80U511r3M9+97ud9f8lk5nZa797P3szf96ZvfbzPKKqIKKB75qyB0BEjcGwEwXBsBMFwbATBcGwEwUxuJF3Nm7cOJ00aVIj73JAOHv2rFn/7LPPcmtjxowxj7322mvNuogk1a2xHzt2zDx26NChZv3GG28064MGDTLrA9HevXtx+PDhPv9RksIuIvcA+A2AQQCeV9UnrOtPmjQJ1Wo15S4L47UgvR/qIu3atcusL1myJLe2YMEC89gZM2aY9ZaWFrM+eLD9I7Rz587c2po1a8xjb7nlFrP+8MMPm/XRo0eb9YGoUqnk1mr+NV5EBgH4TwD3ArgNwEIRua3W2yOiYqX8zd4JYI+qfqKq5wH8EcDc+gyLiOotJew3Afhbr+8/zy77ByKyWESqIlLt7u5OuDsiSlH4q/GqukJVK6paaWtrK/ruiChHStj3AZjY6/sJ2WVE1IRSwv4egCki8h0RaQHwIwBr6zMsIqo3SZn1JiJzAPwHelpvK1X1363rVyoVLar1Vmbr7P333zfrq1evNuuvvvqqWff6xadOncqtnTlzxjz26NGjZr1IU6dONevXXGOfi3bv3m3WrT787NmzzWOXLl1q1u+44w6zXpZKpYJqtVr/PruqvgHgjZTbIKLG4NtliYJg2ImCYNiJgmDYiYJg2ImCYNiJgmjofPYipfbRT548adbvu+++3Nq2bdvMY733ALS2tpr14cOHm3VrzrrXo7948aJZP3HihFn35sNb95/6b9bZ2WnWrbn077zzjnnsxo0bzfqsWbPM+osvvmjWy8AzO1EQDDtREAw7URAMO1EQDDtREAw7URADpvWWav78+WbdWq65vb3dPNZrMV26dMmspyyJ7N221xa8/vrrk24/5b5TWS3LYcOGmcd6/2Zvv/22WfdWBL711lvNehF4ZicKgmEnCoJhJwqCYScKgmEnCoJhJwqCYScKIkyfffPmzWbd6qMDwLhx43Jr3jRRj7fc87599t4b1vGXL182j/V2YfX66N5yz5bz58+b9SFDhpj1kSNHmvUJEybk1rzH7fEe9/PPP2/Wly1blnT/teCZnSgIhp0oCIadKAiGnSgIhp0oCIadKAiGnSiIMH32DRs2mPVz586ZdWtZYq/n6vW6hw4datafeuops97R0ZFbmzhxonns/v37a75twH9sVq/c67NbW1EDwJYtW8z6M888k1tra2szj71w4YJZ9/7NvW24y+izJ4VdRPYC+BLAJQAXVbVSj0ERUf3V48z+L6p6uA63Q0QF4t/sREGkhl0BrBORzSKyuK8riMhiEamKSLW7uzvx7oioVqlhn6WqMwHcC+BBEfn+1VdQ1RWqWlHViveiCBEVJynsqrov+3wIwBoA9k57RFSamsMuIiNEZOSVrwH8EMCOeg2MiOor5dX4dgBrsvW1BwN4SVX/py6jKsArr7xi1r212a1+sjc3+vTp02Z91KhRZv2BBx4w6+vWrcutefP477//frP+3HPPmfVp06aZdev9Cd5c+RtuuMGsP/TQQ2b92Wefza15fXRr3AAwYsQIs757926z/tFHH+XWpk6dah5bq5rDrqqfAPhuHcdCRAVi640oCIadKAiGnSgIhp0oCIadKIgwU1y3bdtm1r2poFabyJse6zlx4kTS8bNnz86ttba2msd6Wws//fTTZt3b6vr111/PrXlLcM+Y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Jp1XADHVqt6ju2fVLXP9d8aGvav3blIVVUrpQ3A0Kxja9ZxARxbrRo1Nv4aTxQEw04URNlhX1Hy/VuadWzNOi6AY6tVQ8ZW6t/sRNQ4ZZ/ZiahBGHaiIEoJu4jcIyL/JyJ7ROSRMsaQR0T2ish2EdkqItWSx7JSRA6JyI5el40VkTdFpCv73OceeyWN7XER2Zc9d1tFZE5JY5soIhtE5EMR2SkiP8suL/W5M8bVkOet4X+zi8ggAB8B+FcAnwN4D8BCVf2woQPJISJ7AVRUtfQ3YIjI9wGcAvB7Vb09u+wpAEdV9YnsP8oxqvqLJhnb4wBOlb2Nd7ZbUUfvbcYBzAPwbyjxuTPGtQANeN7KOLN3Atijqp+o6nkAfwQwt4RxND1V3QTg6FUXzwWwKvt6FXp+WBouZ2xNQVUPqOqW7OsvAVzZZrzU584YV0OUEfabAPyt1/efo7n2e1cA60Rks4gsLnswfWhX1QPZ118AaC9zMH1wt/FupKu2GW+a566W7c9T8QW6r5ulqjMB3AvgwezX1aakPX+DNVPvtF/beDdKH9uM/12Zz12t25+nKiPs+wBM7PX9hOyypqCq+7LPhwCsQfNtRX3wyg662edDJY/n75ppG+++thlHEzx3ZW5/XkbY3wMwRUS+IyItAH4EYG0J4/gaERmRvXACERkB4Idovq2o1wJYlH29CMBrJY7lHzTLNt5524yj5Oeu9O3PVbXhHwDmoOcV+Y8BPFbGGHLGdQuAbdnHzrLHBuBl9PxadwE9r238BMD1ANYD6ALwvwDGNtHY/gvAdgAfoCdYHSWNbRZ6fkX/AMDW7GNO2c+dMa6GPG98uyxREHyBjigIhp0oCIadKAiGnSgIhp0oCIadKAiGnSiI/wdw4AcBPOYUxgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train_labels[1] 0\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw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u7a1b+5LorVWd6o2H8UAQhB0Ioumwr2v4+Cnd2lu39iXRW6s60lujf7MD6Jym79kBdAhhB4JoJOxmdpeZvWtm+83s0SZ6KGNmB8xsV7EM9WDDvWwws2Ez2z1u2xVm9qKZ7Ss+T7jGXkO9dcUy3ollxhu97Zpe/rzjf7Ob2RRJeyX9i6RDkt6QtNLd3+5oIyXM7ICkAXdv/AQMM/uupJOSnnb3G4ttv5J0zN0fL/6jnOvuj3RJb49JOtn0Mt7FakV945cZl3SPpAfU4G2X6Os+deB2a+Kefamk/e7+vruflvQHSSsa6KPrufurko5dsHmFpI3F5Y0a+2XpuJLeuoK7D7n7m8XlE5LOLzPe6G2X6Ksjmgj71ZL+Pu7rQ+qu9d5d0l/MbLuZrWm6mQnMd/eh4vKHkuY32cwEsst4d9IFy4x3zW3XyvLnVfEE3Vfd4e7fkXS3pIeKh6tdycf+Buum2emklvHulAmWGf+HJm+7Vpc/r6qJsB+WdM24r79RbOsK7n64+Dws6Xl131LUR86voFt8Hm64n3/opmW8J1pmXF1w2zW5/HkTYX9D0rVmttDMpkn6oaRNDfTxFWY2s3jiRGY2U9L31X1LUW+StKq4vErSCw328iXdsox32TLjavi2a3z5c3fv+Iek5Rp7Rv49Sb9oooeSvr4p6X+Kj7ea7k3Ssxp7WHdGY89trJZ0paStkvZJ+m9JV3RRb/8haZeknRoLVl9Dvd2hsYfoOyXtKD6WN33bJfrqyO3G6bJAEDxBBwRB2IEgCDsQBGEHgiDsQBCEHQiCsANB/C9DltKhCGQJZQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train_labels[1] 7\n"
     ]
    }
   ],
   "source": [
    "plot_image(train_images[1])\n",
    "print(\"train_labels[1]\",train_labels[1])\n",
    "plot_image(train_images[20000])\n",
    "print(\"train_labels[1]\",train_labels[20000])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "e8bfd1b1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "int_array [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23\n",
      " 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47\n",
      " 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63]\n",
      "int_array [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23\n",
      " 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47\n",
      " 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63]\n",
      "int_array.reshape(8,8) [[ 0  1  2  3  4  5  6  7]\n",
      " [ 8  9 10 11 12 13 14 15]\n",
      " [16 17 18 19 20 21 22 23]\n",
      " [24 25 26 27 28 29 30 31]\n",
      " [32 33 34 35 36 37 38 39]\n",
      " [40 41 42 43 44 45 46 47]\n",
      " [48 49 50 51 52 53 54 55]\n",
      " [56 57 58 59 60 61 62 63]]\n",
      "int_array [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23\n",
      " 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47\n",
      " 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63]\n",
      "int_array.reshape(4,16) [[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15]\n",
      " [16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31]\n",
      " [32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47]\n",
      " [48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63]]\n"
     ]
    }
   ],
   "source": [
    "int_array = np.array([i for i in range(64)])\n",
    "print(\"int_array\",int_array)\n",
    "int_array.reshape(8,8)\n",
    "print(\"int_array\",int_array)\n",
    "print(\"int_array.reshape(8,8)\",int_array.reshape(8,8))\n",
    "int_array.reshape(4,16)\n",
    "print(\"int_array\",int_array)\n",
    "print(\"int_array.reshape(4,16)\",int_array.reshape(4,16))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "c7c83ff4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAB0CAYAAACc/2mdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAALSklEQVR4nO3dW4xV1R3H8d/PAUQRRXEgiFo0lVbTeIkTQ6Opl1al1FRjmkZjIyYmxKQ1NmlTaV9Mm5jYPtT2oS/aktJYb2lrIZVYiaDWpLHMVCsodyMRBGYIRSUqCv77cDbpCGsBZ85t1pnvJyFz9o8ze6+1Z50/m73X7O2IEACgPMd1ugEAgJGhgANAoSjgAFAoCjgAFIoCDgCFooADQKEaKuC259peb3uT7YXNahQA4Og80nngtnskbZB0raStklZJujUi3sh9z+mnnx6zZs0a0fYAYKwaGBjYFRG9h+bjGljnZZI2RcSbkmT7cUk3SsoW8FmzZqm/v7+BTQLA2GN7Sypv5BTKTElvD1veWmUAgDZo+UVM2wts99vuHxoaavXmAGDMaKSAb5N01rDlM6vsMyLioYjoi4i+3t7DTuEAAEaokQK+StJ5ts+xPUHSLZKWNqdZAICjGfFFzIjYb/t7kv4uqUfSooh4vWktAwAcUSOzUBQRyyQta1JbAAB14DcxAaBQFHAAKBQFHAAKRQEHgEJRwAGgUBRwACgUBRwACkUBB4BCUcABoFAUcAAoFAUcAApFAQeAQlHAAaBQFHAAKBQFHAAKRQEHgEI19EAHAN3lwIEDybynp6eu9WzatCmZb9myJZlPmjQpmc+ZM6eu7Tar/a22bt26ZD558uS61sMROAAUigIOAIWigANAoSjgAFCohi5i2n5L0vuSDkjaHxF9zWgUAODomjEL5eqI2NWE9Yx6n376aTI/7rjW/kfmjjvuSOaLFy9O5rNnz07mGzZsqGs9t99++9EbdwwiIpnnZgyMG9ecyVErV65M5jNnzjwsy+2zTsntM9st3e7dd9+dzJ944olkPm3atGR+yimnJPPx48cn89xYWLVqVTLv60sfKy5atCiZn3/++cm81V544YVkfvPNNyfz1atX17V+TqEAQKEaLeAh6VnbA7YXNKNBAIBj0+j/Va+IiG22p0labntdRLw4/A1VYV8gSWeffXaDmwMAHNTQEXhEbKu+Dkp6StJlifc8FBF9EdHX29vbyOYAAMOMuIDbnmR78sHXkq6TtKZZDQMAHJlzV7uP+o32uaoddUu1UzGPRsT9R/qevr6+6O/vPyzPze7IXXFv9ZX4nBUrViTzhx9+OJk//fTTyfyMM85I5rn7QeSu6Od+dh988EEyz82Wye3PPXv2JPO1a9cm88svvzyZz5s3L5nn9sM777yTzJ9//vlkPjQ0lMx37UpPjnrkkUcOy6688srkezslt4/vvffeZP7aa68l8xNPPDGZ58bU8ccfn8xzYy03pnLv37dvXzL/6KOPknlubObubbJ///661p/7rNTb39zsmpNPPjmZ7927N5nfdtttyfy+++4bSE3THvE58Ih4U9JFI/1+AEBjmEYIAIWigANAoSjgAFAoCjgAFGpUPJHnmWeeSeYvvfRSMs9dwc3NOti+fXsyf++995J57opy7gp97or4JZdckszrfWpIrr+59dQ7q2fChAnJPDcrJtevjz/+OJkvWbIkmdd7D5nczIATTjghmed+jsuXLz8su/TSS5Pvveuuu5L5wMBAMs/t+9zsiFwb6/1Z5Z7kkhtTuVkZuVkiuX3f6vsD5bb7ySefJPPcfst9didOnDiyhh2j3H748MMPk/mOHTvqW3/dLQIAjAoUcAAoFAUcAApFAQeAQlHAAaBQI74XykhceOGFsWzZssPy3D0xcldwc/fo2Lp1azLPPYlm48aNyfzdd99N5ps3b66rPYODg8k8N6skN1Mhd8U9l+dmg+RmreSu3Of2f+6JObn15+S2m1t/bsbGSSedlMy3bNmSzB988MHDsuuvvz753p07d9a1zRkzZ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kfTd6mfarX3eJ+maiLhI0sWS5tqeI+nnkh6MiM9L+q+kOzvXxKa7R9LaYcvd3FdJujoiLh42dXDUjuV2H4FfJmlTRLwZER9LelzSjW1uQ0tFxIuSdh8S3yhpcfV6saSb2tmmVoqI7RHx7+r1+6p90GeqS/scNXurxfHVn5B0jaQ/VXnX9Nf2mZK+Iem31bLVpX09glE7lttdwGdKenvY8tYq63bTI2J79XqHpOmdbEyr2J4l6RJJL6uL+1ydUnhV0qCk5ZI2S9oTEfurt3TTuP6VpB9J+rRanqru7atU+8f4WdsDthdU2agdy+M63YCxJiLCdtdN/bF9kqQ/S/p+RLxXO1Cr6bY+R8QBSRfbniLpKUlf7GyLWsP2DZIGI2LA9lUdbk67XBER22xPk7Tc9rrhfznaxnK7j8C3STpr2PKZVdbtdtqeIUnV18EOt6epbI9XrXj/MSL+UsVd3WdJiog9klZK+rKkKbYPHhB1y7i+XNI3bb+l2unOayT9Wt3ZV0lSRGyrvg6q9o/zZRrFY7ndBXyVpPOqq9gTJN0iaWmb29AJSyXNr17Pl7Skg21pquqc6O8krY2IXw77q67ss+3e6shbtk+QdK1q5/1XSvpW9bau6G9E/DgizoyIWap9VldExG3qwr5Kku1JticffC3pOklrNIrHctt/kcf2PNXOq/VIWhQR97e1AS1m+zFJV6l2B7Odku6T9FdJT0o6W7W7MX47Ig690Fkk21dI+oek1fr/edKfqHYevOv6bPtC1S5k9ah2APRkRPzM9rmqHaWeJukVSd+JiH2da2lzVadQfhgRN3RrX6t+PVUtjpP0aETcb3uqRulY5jcxAaBQ/CYmABSKAg4AhaKAA0ChKOAAUCgKOAAUigIOAIWigANAoSjgAFCo/wGAEMlZ9riO2QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAB0CAYAAACc/2mdAAAAOXRFWHRTb2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ydUnhV0qCk5ZI2S9oTEfurt3TTuP6VpB9J+rRanqru7atU+8f4WdsDthdU2agdy+M63YCxJiLCdtdN/bF9kqQ/S/p+RLxXO1Cr6bY+R8QBSRfbniLpKUlf7GyLWsP2DZIGI2LA9lUdbk67XBER22xPk7Tc9rrhfznaxnK7j8C3STpr2PKZVdbtdtqeIUnV18EOt6epbI9XrXj/MSL+UsVd3WdJiog9klZK+rKkKbYPHhB1y7i+XNI3bb+l2unOayT9Wt3ZV0lSRGyrvg6q9o/zZRrFY7ndBXyVpPOqq9gTJN0iaWmb29AJSyXNr17Pl7Skg21pquqc6O8krY2IXw77q67ss+3e6shbtk+QdK1q5/1XSvpW9bau6G9E/DgizoyIWap9VldExG3qwr5Kku1JticffC3pOklrNIrHctt/kcf2PNXOq/VIWhQR97e1AS1m+zFJV6l2B7Odku6T9FdJT0o6W7W7MX47Ig690Fkk21dI+oek1fr/edKfqHYevOv6bPtC1S5k9ah2APRkRPzM9rmqHaWeJukVSd+JiH2da2lzVadQfhgRN3RrX6t+PVUtjpP0aETcb3uqRulY5jcxAaBQ/CYmABSKAg4AhaKAA0ChKOAAUCgKOAAUigIOAIWigANAoSjgAFCo/wGAEMlZ9riO2QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.imshow(train_images[20000].reshape(14,56),cmap='binary')\n",
    "plt.show()\n",
    "# my method\n",
    "plot_image_org(train_images[20000].reshape(14,56))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3338d4a6",
   "metadata": {},
   "source": [
    "# 逻辑回归 神经网络 全连接 写法"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "287c1f8f",
   "metadata": {},
   "source": [
    "划分验证集 如果没有划分的话那么这边需要划分下, 我们可以尝试写成方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "a454d163",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(48000, 28, 28) (12000, 28, 28) (10000, 28, 28)\n",
      "(48000,) (12000,) (10000,)\n",
      "255.0\n",
      "(48000, 784) (12000, 784) (10000, 784)\n",
      "(48000,) (12000,) (10000,)\n",
      "tf.Tensor(\n",
      "[0.         0.         0.         0.         0.         0.00392157\n",
      " 0.         0.         0.         0.         0.16078432 0.7372549\n",
      " 0.40392157 0.21176471 0.1882353  0.16862746 0.34117648 0.65882355\n",
      " 0.52156866 0.0627451  0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.00392157 0.         0.         0.         0.19215687\n",
      " 0.53333336 0.85882354 0.84705883 0.89411765 0.9254902  1.\n",
      " 1.         1.         1.         0.8509804  0.84313726 0.99607843\n",
      " 0.90588236 0.627451   0.1764706  0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.05490196 0.6901961  0.87058824 0.8784314  0.83137256\n",
      " 0.79607844 0.7764706  0.76862746 0.78431374 0.84313726 0.8\n",
      " 0.7921569  0.7882353  0.7882353  0.7882353  0.81960785 0.85490197\n",
      " 0.8784314  0.6431373  0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.7372549\n",
      " 0.85882354 0.78431374 0.7764706  0.7921569  0.7764706  0.78039217\n",
      " 0.78039217 0.7882353  0.76862746 0.7764706  0.7764706  0.78431374\n",
      " 0.78431374 0.78431374 0.78431374 0.7882353  0.78431374 0.88235295\n",
      " 0.16078432 0.         0.         0.         0.         0.\n",
      " 0.         0.         0.2        0.85882354 0.78039217 0.79607844\n",
      " 0.79607844 0.83137256 0.93333334 0.972549   0.98039216 0.9607843\n",
      " 0.9764706  0.9647059  0.96862745 0.9882353  0.972549   0.92156863\n",
      " 0.8117647  0.79607844 0.79607844 0.87058824 0.54901963 0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.45490196 0.8862745  0.80784315 0.8        0.8117647  0.8\n",
      " 0.39607844 0.29411766 0.18431373 0.28627452 0.1882353  0.19607843\n",
      " 0.1764706  0.2        0.24705882 0.44313726 0.87058824 0.7921569\n",
      " 0.80784315 0.8627451  0.8784314  0.         0.         0.\n",
      " 0.         0.         0.         0.         0.78431374 0.87058824\n",
      " 0.81960785 0.79607844 0.84313726 0.78431374 0.         0.27450982\n",
      " 0.38431373 0.         0.40392157 0.23137255 0.26666668 0.2784314\n",
      " 0.19215687 0.         0.85882354 0.80784315 0.8392157  0.8235294\n",
      " 0.98039216 0.14901961 0.         0.         0.         0.\n",
      " 0.         0.         0.96862745 0.85490197 0.83137256 0.8235294\n",
      " 0.84313726 0.8392157  0.         0.99607843 0.9529412  0.54509807\n",
      " 1.         0.68235296 0.9843137  1.         0.8039216  0.\n",
      " 0.84313726 0.8509804  0.8392157  0.8156863  0.8627451  0.37254903\n",
      " 0.         0.         0.         0.         0.         0.1764706\n",
      " 0.8862745  0.8392157  0.8392157  0.84313726 0.8784314  0.8039216\n",
      " 0.         0.16470589 0.13725491 0.23529412 0.0627451  0.06666667\n",
      " 0.04705882 0.05098039 0.27450982 0.         0.7411765  0.84705883\n",
      " 0.83137256 0.80784315 0.83137256 0.6117647  0.         0.\n",
      " 0.         0.         0.         0.6431373  0.92156863 0.8392157\n",
      " 0.827451   0.8627451  0.84705883 0.7882353  0.20392157 0.2784314\n",
      " 0.34901962 0.36862746 0.3254902  0.30588236 0.27450982 0.29803923\n",
      " 0.36078432 0.34117648 0.80784315 0.8117647  0.87058824 0.8352941\n",
      " 0.85882354 0.8156863  0.         0.         0.         0.\n",
      " 0.         0.41568628 0.73333335 0.8745098  0.92941177 0.972549\n",
      " 0.827451   0.7764706  0.9882353  0.98039216 0.972549   0.9607843\n",
      " 0.972549   0.9882353  0.99215686 0.98039216 0.9882353  0.9372549\n",
      " 0.7882353  0.83137256 0.88235295 0.84313726 0.75686276 0.44313726\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.06666667 0.21176471 0.62352943 0.87058824 0.75686276\n",
      " 0.8156863  0.7529412  0.77254903 0.78431374 0.78431374 0.78431374\n",
      " 0.78431374 0.7882353  0.79607844 0.7647059  0.8235294  0.64705884\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.18431373 0.88235295 0.7529412  0.8392157  0.79607844\n",
      " 0.80784315 0.8        0.8        0.8039216  0.80784315 0.8\n",
      " 0.83137256 0.77254903 0.85490197 0.41960785 0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.         0.00392157 0.02352941 0.         0.18039216\n",
      " 0.83137256 0.7647059  0.83137256 0.7921569  0.80784315 0.8039216\n",
      " 0.8        0.8039216  0.80784315 0.8        0.83137256 0.78431374\n",
      " 0.85490197 0.35686275 0.         0.01176471 0.00392157 0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.00392157 0.         0.04313726 0.77254903 0.78039217\n",
      " 0.8039216  0.7921569  0.8039216  0.80784315 0.8        0.8039216\n",
      " 0.8117647  0.8        0.8039216  0.8039216  0.85490197 0.3019608\n",
      " 0.         0.01960784 0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.01176471\n",
      " 0.         0.00784314 0.7490196  0.7764706  0.7882353  0.8039216\n",
      " 0.80784315 0.8039216  0.8039216  0.80784315 0.81960785 0.80784315\n",
      " 0.78039217 0.81960785 0.85882354 0.2901961  0.         0.01960784\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.         0.         0.00784314 0.         0.\n",
      " 0.7372549  0.77254903 0.78431374 0.8117647  0.8117647  0.8\n",
      " 0.8117647  0.8117647  0.8235294  0.8156863  0.7764706  0.8117647\n",
      " 0.8666667  0.28235295 0.         0.01568628 0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.00784314 0.         0.         0.84313726 0.7764706\n",
      " 0.79607844 0.80784315 0.8156863  0.8039216  0.8117647  0.8117647\n",
      " 0.8235294  0.8156863  0.78431374 0.7921569  0.87058824 0.29411766\n",
      " 0.         0.01568628 0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.00392157\n",
      " 0.         0.         0.83137256 0.7764706  0.81960785 0.80784315\n",
      " 0.81960785 0.80784315 0.8156863  0.8117647  0.827451   0.80784315\n",
      " 0.8039216  0.7764706  0.8666667  0.3137255  0.         0.01176471\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.         0.         0.00392157 0.         0.\n",
      " 0.8        0.7882353  0.8039216  0.8156863  0.8117647  0.8039216\n",
      " 0.827451   0.8039216  0.8235294  0.8235294  0.81960785 0.7647059\n",
      " 0.8666667  0.3764706  0.         0.01176471 0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.00392157 0.         0.         0.7921569  0.7882353\n",
      " 0.8039216  0.81960785 0.8117647  0.8039216  0.8352941  0.80784315\n",
      " 0.8235294  0.81960785 0.8235294  0.7607843  0.8509804  0.4117647\n",
      " 0.         0.00784314 0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.00392157\n",
      " 0.         0.         0.8        0.8        0.8039216  0.8156863\n",
      " 0.8117647  0.8039216  0.84313726 0.8117647  0.8235294  0.8156863\n",
      " 0.827451   0.75686276 0.8352941  0.4509804  0.         0.00784314\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.8        0.8117647  0.8117647  0.8156863  0.80784315 0.80784315\n",
      " 0.84313726 0.8235294  0.8235294  0.8117647  0.83137256 0.7647059\n",
      " 0.8235294  0.4627451  0.         0.00784314 0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.00392157 0.         0.         0.7764706  0.8156863\n",
      " 0.8156863  0.8156863  0.8        0.8117647  0.83137256 0.83137256\n",
      " 0.8235294  0.8117647  0.827451   0.76862746 0.8117647  0.4745098\n",
      " 0.         0.00392157 0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.00392157\n",
      " 0.         0.         0.7764706  0.8235294  0.8117647  0.8156863\n",
      " 0.80784315 0.81960785 0.8352941  0.83137256 0.827451   0.8117647\n",
      " 0.8235294  0.77254903 0.8117647  0.4862745  0.         0.00392157\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.6745098  0.8235294  0.79607844 0.7882353  0.78039217 0.8\n",
      " 0.8117647  0.8039216  0.8        0.7882353  0.8039216  0.77254903\n",
      " 0.80784315 0.49803922 0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.7372549  0.8666667\n",
      " 0.8392157  0.91764706 0.9254902  0.93333334 0.95686275 0.95686275\n",
      " 0.95686275 0.9411765  0.9529412  0.8392157  0.8784314  0.63529414\n",
      " 0.         0.00784314 0.         0.         0.         0.\n",
      " 0.         0.         0.         0.         0.         0.00392157\n",
      " 0.         0.         0.54509807 0.57254905 0.50980395 0.5294118\n",
      " 0.5294118  0.5372549  0.49019608 0.4862745  0.49019608 0.4745098\n",
      " 0.46666667 0.44705883 0.50980395 0.29803923 0.         0.\n",
      " 0.         0.         0.         0.        ], shape=(784,), dtype=float32)\n"
     ]
    }
   ],
   "source": [
    "# 划分数据 上一次实验是 一个集里分出 训练验证 测试集,  这次实验是 给了 训练和测试集 如果要写函数需要同一标准这里还是先不麻烦了\n",
    "\n",
    "valid_split = 0.2\n",
    "x_data = train_images\n",
    "y_data = train_labels\n",
    "\n",
    "total_num =  len(x_data) \n",
    "train_num = int(total_num * (1-valid_split))\n",
    "vaild_num = int(total_num *valid_split)\n",
    "test_num = total_num- train_num-vaild_num\n",
    "x_train = x_data[:train_num]\n",
    "y_train = y_data[:train_num]\n",
    "\n",
    "x_valid = x_data[train_num:train_num+vaild_num]\n",
    "y_valid = y_data[train_num:train_num+vaild_num]\n",
    "\n",
    "# x_test = x_data[train_num+vaild_num:total_num]\n",
    "# y_test = y_data[train_num+vaild_num:total_num]\n",
    "\n",
    "x_test = test_images \n",
    "y_test = test_labels\n",
    "print(x_train.shape,x_valid.shape,x_test.shape)\n",
    "print(y_train.shape,y_valid.shape,y_test.shape)\n",
    "# 或者可以看到如果按照现在的写成方法的 方式来做的话 test 为空 那么划分结束之后再 赋值也不迟\n",
    "\n",
    "# x_test = test_images \n",
    "# y_test = test_labels\n",
    "\n",
    "\n",
    "# print(y_train.shape,y_valid.shape,y_test.shape)\n",
    "# 拉直为1行\n",
    "x_train = x_train.reshape(-1,784)\n",
    "x_valid = x_valid.reshape(-1,784)\n",
    "x_test = x_test.reshape(-1,784)\n",
    "\n",
    "\n",
    "# 归一化\n",
    "# 数据是0-255之间 可以改的鲁棒性更强一点\n",
    "data_range = float(x_train.max() - x_train.min())\n",
    "print(data_range)\n",
    "x_train = tf.cast(x_train/data_range,tf.float32)\n",
    "x_valid = tf.cast(x_valid/data_range,tf.float32)\n",
    "x_test = tf.cast(x_test/data_range,tf.float32)\n",
    "print(x_train.shape,x_valid.shape,x_test.shape)\n",
    "print(y_train.shape,y_valid.shape,y_test.shape)\n",
    "print(x_train[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "76714a18",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 标签 独热编码 ?\n",
    " "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "570c0f68",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<tf.Tensor: shape=(2, 10), dtype=float32, numpy=\n",
       "array([[0., 0., 0., 1., 0., 0., 0., 0., 0., 0.],\n",
       "       [0., 0., 0., 0., 1., 0., 0., 0., 0., 0.]], dtype=float32)>"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x= [3,4]\n",
    "tf.one_hot(x,depth=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "8a63a457",
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train = tf.one_hot(y_train,depth=10)\n",
    "y_valid = tf.one_hot(y_valid,depth=10)\n",
    "y_test = tf.one_hot(y_test,depth=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "id": "d0a540f0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tf.Tensor(\n",
      "[[0. 0. 0. ... 0. 0. 1.]\n",
      " [1. 0. 0. ... 0. 0. 0.]\n",
      " [1. 0. 0. ... 0. 0. 0.]\n",
      " ...\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 1. 0. 0.]\n",
      " [1. 0. 0. ... 0. 0. 0.]], shape=(48000, 10), dtype=float32)\n"
     ]
    }
   ],
   "source": [
    "print(y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "0d86cbb3",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 定义模型  softmax 激活? \n",
    "def model(x, w, b):\n",
    "    pred = tf.matmul(x,w) + b\n",
    "    return tf.nn.softmax(pred)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "1c4a9666",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "W = tf.Variable(tf.random.normal([28*28,10],mean=0.0,stddev=1.0,dtype=tf.float32))\n",
    "B = tf.Variable(tf.zeros(10),dtype = tf.float32)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "15e5245b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 损失函数模型\n",
    "def loss(x,y,w,b):\n",
    "#     err = model (x,w,b) -y\n",
    "#     loss_ = tf.square(err)\n",
    "#     print(x.shape,y.shape,w.shape,b.shape)\n",
    "    pred = model (x,w,b)\n",
    "    loss_ = tf.keras.losses.categorical_crossentropy(y_true=y,y_pred = pred)\n",
    "    # 可以用二元的包里有\n",
    "    return tf.reduce_mean(loss_)# 梯度\n",
    "def grad(x,y,w,b):\n",
    "    # tf.GradientTape() tf2 1 区别 梯度带\n",
    "    with tf.GradientTape() as tape:\n",
    "        loss_ =loss(x,y,w,b) # 不需要优化器\n",
    "    return tape.gradient(loss_,[w,b]) \n",
    "# 框架提供的梯度代码\n",
    "\n",
    "def accuracy(x,y,w,b):\n",
    "    pred = model(x,w,b)\n",
    "    # 独热编码还原 argmax\n",
    "    correct_pred = tf.equal(tf.argmax(pred,1),tf.argmax(y,1))\n",
    "    return tf.reduce_mean( tf.cast(correct_pred,tf.float32))# 梯度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "99f28fe5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "960 48000 50\n"
     ]
    }
   ],
   "source": [
    "\n",
    "training_epochs = 500\n",
    "learning_rate = 0.0003\n",
    "batch_size = 50\n",
    "\n",
    "# optimizer = tf.keras.optimizers.SGD(learning_rate) 随机梯度下降\n",
    "#adam优化器\n",
    "optimizer = tf.keras.optimizers.Adam(learning_rate=learning_rate)\n",
    "\n",
    "total_step = int(train_num/batch_size)\n",
    "print(total_step,train_num, batch_size)\n",
    "loss_list_train = []\n",
    "loss_list_valid = []\n",
    "acc_list_train = []\n",
    "acc_list_valid = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "8904a446",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch=  1, train_loss=3.2379,valid_loss=3.2299,, acc_train=0.4698,acc_valid=0.4767\n",
      "epoch=  2, train_loss=2.3108,valid_loss=2.3178,, acc_train=0.5848,acc_valid=0.5838\n",
      "epoch=  3, train_loss=1.9146,valid_loss=1.9357,, acc_train=0.6351,acc_valid=0.6322\n",
      "epoch=  4, train_loss=1.6706,valid_loss=1.7018,, acc_train=0.6681,acc_valid=0.6638\n",
      "epoch=  5, train_loss=1.5023,valid_loss=1.5405,, acc_train=0.6924,acc_valid=0.6854\n",
      "epoch=  6, train_loss=1.3795,valid_loss=1.4217,, acc_train=0.7100,acc_valid=0.7035\n",
      "epoch=  7, train_loss=1.2858,valid_loss=1.3305,, acc_train=0.7236,acc_valid=0.7180\n",
      "epoch=  8, train_loss=1.2114,valid_loss=1.2576,, acc_train=0.7352,acc_valid=0.7306\n",
      "epoch=  9, train_loss=1.1504,valid_loss=1.1976,, acc_train=0.7444,acc_valid=0.7390\n",
      "epoch= 10, train_loss=1.0993,valid_loss=1.1472,, acc_train=0.7523,acc_valid=0.7476\n",
      "epoch= 11, train_loss=1.0557,valid_loss=1.1044,, acc_train=0.7587,acc_valid=0.7546\n",
      "epoch= 12, train_loss=1.0179,valid_loss=1.0672,, acc_train=0.7642,acc_valid=0.7593\n",
      "epoch= 13, train_loss=0.9847,valid_loss=1.0348,, acc_train=0.7698,acc_valid=0.7658\n",
      "epoch= 14, train_loss=0.9557,valid_loss=1.0066,, acc_train=0.7738,acc_valid=0.7697\n",
      "epoch= 15, train_loss=0.9294,valid_loss=0.9812,, acc_train=0.7785,acc_valid=0.7746\n",
      "epoch= 16, train_loss=0.9058,valid_loss=0.9587,, acc_train=0.7820,acc_valid=0.7764\n",
      "epoch= 17, train_loss=0.8844,valid_loss=0.9383,, acc_train=0.7853,acc_valid=0.7803\n",
      "epoch= 18, train_loss=0.8651,valid_loss=0.9199,, acc_train=0.7880,acc_valid=0.7820\n",
      "epoch= 19, train_loss=0.8473,valid_loss=0.9031,, acc_train=0.7911,acc_valid=0.7839\n",
      "epoch= 20, train_loss=0.8311,valid_loss=0.8878,, acc_train=0.7934,acc_valid=0.7860\n",
      "epoch= 21, train_loss=0.8161,valid_loss=0.8738,, acc_train=0.7961,acc_valid=0.7891\n",
      "epoch= 22, train_loss=0.8022,valid_loss=0.8608,, acc_train=0.7984,acc_valid=0.7910\n",
      "epoch= 23, train_loss=0.7893,valid_loss=0.8488,, acc_train=0.8011,acc_valid=0.7927\n",
      "epoch= 24, train_loss=0.7773,valid_loss=0.8375,, acc_train=0.8026,acc_valid=0.7948\n",
      "epoch= 25, train_loss=0.7660,valid_loss=0.8270,, acc_train=0.8041,acc_valid=0.7961\n",
      "epoch= 26, train_loss=0.7555,valid_loss=0.8172,, acc_train=0.8061,acc_valid=0.7981\n",
      "epoch= 27, train_loss=0.7456,valid_loss=0.8080,, acc_train=0.8074,acc_valid=0.7991\n",
      "epoch= 28, train_loss=0.7361,valid_loss=0.7993,, acc_train=0.8086,acc_valid=0.8012\n",
      "epoch= 29, train_loss=0.7271,valid_loss=0.7910,, acc_train=0.8100,acc_valid=0.8021\n",
      "epoch= 30, train_loss=0.7187,valid_loss=0.7832,, acc_train=0.8114,acc_valid=0.8029\n",
      "epoch= 31, train_loss=0.7106,valid_loss=0.7758,, acc_train=0.8129,acc_valid=0.8036\n",
      "epoch= 32, train_loss=0.7029,valid_loss=0.7687,, acc_train=0.8140,acc_valid=0.8049\n",
      "epoch= 33, train_loss=0.6956,valid_loss=0.7620,, acc_train=0.8149,acc_valid=0.8058\n",
      "epoch= 34, train_loss=0.6886,valid_loss=0.7555,, acc_train=0.8161,acc_valid=0.8066\n",
      "epoch= 35, train_loss=0.6819,valid_loss=0.7494,, acc_train=0.8170,acc_valid=0.8073\n",
      "epoch= 36, train_loss=0.6754,valid_loss=0.7435,, acc_train=0.8181,acc_valid=0.8077\n",
      "epoch= 37, train_loss=0.6692,valid_loss=0.7379,, acc_train=0.8191,acc_valid=0.8086\n",
      "epoch= 38, train_loss=0.6633,valid_loss=0.7325,, acc_train=0.8198,acc_valid=0.8090\n",
      "epoch= 39, train_loss=0.6575,valid_loss=0.7273,, acc_train=0.8209,acc_valid=0.8090\n",
      "epoch= 40, train_loss=0.6520,valid_loss=0.7223,, acc_train=0.8217,acc_valid=0.8107\n",
      "epoch= 41, train_loss=0.6466,valid_loss=0.7174,, acc_train=0.8225,acc_valid=0.8116\n",
      "epoch= 42, train_loss=0.6414,valid_loss=0.7128,, acc_train=0.8233,acc_valid=0.8120\n",
      "epoch= 43, train_loss=0.6364,valid_loss=0.7083,, acc_train=0.8243,acc_valid=0.8125\n",
      "epoch= 44, train_loss=0.6316,valid_loss=0.7039,, acc_train=0.8251,acc_valid=0.8128\n",
      "epoch= 45, train_loss=0.6269,valid_loss=0.6997,, acc_train=0.8259,acc_valid=0.8136\n",
      "epoch= 46, train_loss=0.6223,valid_loss=0.6956,, acc_train=0.8266,acc_valid=0.8138\n",
      "epoch= 47, train_loss=0.6179,valid_loss=0.6916,, acc_train=0.8273,acc_valid=0.8143\n",
      "epoch= 48, train_loss=0.6136,valid_loss=0.6878,, acc_train=0.8279,acc_valid=0.8147\n",
      "epoch= 49, train_loss=0.6094,valid_loss=0.6841,, acc_train=0.8285,acc_valid=0.8148\n",
      "epoch= 50, train_loss=0.6053,valid_loss=0.6804,, acc_train=0.8290,acc_valid=0.8156\n",
      "epoch= 51, train_loss=0.6014,valid_loss=0.6769,, acc_train=0.8295,acc_valid=0.8157\n",
      "epoch= 52, train_loss=0.5975,valid_loss=0.6735,, acc_train=0.8301,acc_valid=0.8166\n",
      "epoch= 53, train_loss=0.5937,valid_loss=0.6701,, acc_train=0.8306,acc_valid=0.8171\n",
      "epoch= 54, train_loss=0.5901,valid_loss=0.6669,, acc_train=0.8315,acc_valid=0.8175\n",
      "epoch= 55, train_loss=0.5865,valid_loss=0.6637,, acc_train=0.8319,acc_valid=0.8179\n",
      "epoch= 56, train_loss=0.5830,valid_loss=0.6606,, acc_train=0.8324,acc_valid=0.8188\n",
      "epoch= 57, train_loss=0.5796,valid_loss=0.6576,, acc_train=0.8330,acc_valid=0.8188\n",
      "epoch= 58, train_loss=0.5763,valid_loss=0.6547,, acc_train=0.8334,acc_valid=0.8194\n",
      "epoch= 59, train_loss=0.5730,valid_loss=0.6519,, acc_train=0.8338,acc_valid=0.8201\n",
      "epoch= 60, train_loss=0.5699,valid_loss=0.6491,, acc_train=0.8343,acc_valid=0.8202\n",
      "epoch= 61, train_loss=0.5668,valid_loss=0.6464,, acc_train=0.8349,acc_valid=0.8202\n",
      "epoch= 62, train_loss=0.5637,valid_loss=0.6438,, acc_train=0.8353,acc_valid=0.8206\n",
      "epoch= 63, train_loss=0.5608,valid_loss=0.6412,, acc_train=0.8358,acc_valid=0.8211\n",
      "epoch= 64, train_loss=0.5579,valid_loss=0.6386,, acc_train=0.8363,acc_valid=0.8208\n",
      "epoch= 65, train_loss=0.5550,valid_loss=0.6362,, acc_train=0.8365,acc_valid=0.8212\n",
      "epoch= 66, train_loss=0.5522,valid_loss=0.6338,, acc_train=0.8368,acc_valid=0.8215\n",
      "epoch= 67, train_loss=0.5495,valid_loss=0.6314,, acc_train=0.8374,acc_valid=0.8213\n",
      "epoch= 68, train_loss=0.5469,valid_loss=0.6291,, acc_train=0.8382,acc_valid=0.8214\n",
      "epoch= 69, train_loss=0.5442,valid_loss=0.6268,, acc_train=0.8387,acc_valid=0.8216\n",
      "epoch= 70, train_loss=0.5417,valid_loss=0.6246,, acc_train=0.8392,acc_valid=0.8217\n",
      "epoch= 71, train_loss=0.5392,valid_loss=0.6225,, acc_train=0.8395,acc_valid=0.8219\n",
      "epoch= 72, train_loss=0.5367,valid_loss=0.6203,, acc_train=0.8396,acc_valid=0.8226\n",
      "epoch= 73, train_loss=0.5343,valid_loss=0.6182,, acc_train=0.8401,acc_valid=0.8231\n",
      "epoch= 74, train_loss=0.5319,valid_loss=0.6162,, acc_train=0.8403,acc_valid=0.8233\n",
      "epoch= 75, train_loss=0.5296,valid_loss=0.6141,, acc_train=0.8407,acc_valid=0.8234\n",
      "epoch= 76, train_loss=0.5273,valid_loss=0.6122,, acc_train=0.8410,acc_valid=0.8239\n",
      "epoch= 77, train_loss=0.5251,valid_loss=0.6102,, acc_train=0.8414,acc_valid=0.8241\n",
      "epoch= 78, train_loss=0.5229,valid_loss=0.6083,, acc_train=0.8415,acc_valid=0.8244\n",
      "epoch= 79, train_loss=0.5207,valid_loss=0.6064,, acc_train=0.8420,acc_valid=0.8246\n",
      "epoch= 80, train_loss=0.5186,valid_loss=0.6045,, acc_train=0.8422,acc_valid=0.8252\n",
      "epoch= 81, train_loss=0.5165,valid_loss=0.6027,, acc_train=0.8425,acc_valid=0.8253\n",
      "epoch= 82, train_loss=0.5145,valid_loss=0.6009,, acc_train=0.8427,acc_valid=0.8259\n",
      "epoch= 83, train_loss=0.5124,valid_loss=0.5992,, acc_train=0.8429,acc_valid=0.8258\n",
      "epoch= 84, train_loss=0.5105,valid_loss=0.5975,, acc_train=0.8435,acc_valid=0.8263\n",
      "epoch= 85, train_loss=0.5085,valid_loss=0.5958,, acc_train=0.8438,acc_valid=0.8265\n",
      "epoch= 86, train_loss=0.5066,valid_loss=0.5942,, acc_train=0.8441,acc_valid=0.8265\n",
      "epoch= 87, train_loss=0.5048,valid_loss=0.5926,, acc_train=0.8445,acc_valid=0.8268\n",
      "epoch= 88, train_loss=0.5029,valid_loss=0.5910,, acc_train=0.8447,acc_valid=0.8267\n",
      "epoch= 89, train_loss=0.5011,valid_loss=0.5895,, acc_train=0.8451,acc_valid=0.8273\n",
      "epoch= 90, train_loss=0.4994,valid_loss=0.5880,, acc_train=0.8456,acc_valid=0.8275\n",
      "epoch= 91, train_loss=0.4976,valid_loss=0.5865,, acc_train=0.8457,acc_valid=0.8281\n",
      "epoch= 92, train_loss=0.4959,valid_loss=0.5851,, acc_train=0.8462,acc_valid=0.8282\n",
      "epoch= 93, train_loss=0.4942,valid_loss=0.5837,, acc_train=0.8464,acc_valid=0.8286\n",
      "epoch= 94, train_loss=0.4925,valid_loss=0.5823,, acc_train=0.8468,acc_valid=0.8289\n",
      "epoch= 95, train_loss=0.4909,valid_loss=0.5809,, acc_train=0.8470,acc_valid=0.8292\n",
      "epoch= 96, train_loss=0.4893,valid_loss=0.5795,, acc_train=0.8475,acc_valid=0.8295\n",
      "epoch= 97, train_loss=0.4877,valid_loss=0.5782,, acc_train=0.8478,acc_valid=0.8293\n",
      "epoch= 98, train_loss=0.4861,valid_loss=0.5769,, acc_train=0.8481,acc_valid=0.8294\n",
      "epoch= 99, train_loss=0.4846,valid_loss=0.5756,, acc_train=0.8483,acc_valid=0.8296\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch=100, train_loss=0.4831,valid_loss=0.5743,, acc_train=0.8486,acc_valid=0.8294\n",
      "epoch=101, train_loss=0.4816,valid_loss=0.5731,, acc_train=0.8491,acc_valid=0.8293\n",
      "epoch=102, train_loss=0.4801,valid_loss=0.5719,, acc_train=0.8494,acc_valid=0.8292\n",
      "epoch=103, train_loss=0.4787,valid_loss=0.5707,, acc_train=0.8498,acc_valid=0.8293\n",
      "epoch=104, train_loss=0.4772,valid_loss=0.5695,, acc_train=0.8500,acc_valid=0.8295\n",
      "epoch=105, train_loss=0.4758,valid_loss=0.5683,, acc_train=0.8503,acc_valid=0.8295\n",
      "epoch=106, train_loss=0.4744,valid_loss=0.5672,, acc_train=0.8506,acc_valid=0.8297\n",
      "epoch=107, train_loss=0.4731,valid_loss=0.5661,, acc_train=0.8506,acc_valid=0.8295\n",
      "epoch=108, train_loss=0.4717,valid_loss=0.5650,, acc_train=0.8510,acc_valid=0.8296\n",
      "epoch=109, train_loss=0.4704,valid_loss=0.5639,, acc_train=0.8514,acc_valid=0.8295\n",
      "epoch=110, train_loss=0.4691,valid_loss=0.5628,, acc_train=0.8517,acc_valid=0.8298\n",
      "epoch=111, train_loss=0.4678,valid_loss=0.5617,, acc_train=0.8520,acc_valid=0.8298\n",
      "epoch=112, train_loss=0.4666,valid_loss=0.5607,, acc_train=0.8523,acc_valid=0.8296\n",
      "epoch=113, train_loss=0.4653,valid_loss=0.5597,, acc_train=0.8525,acc_valid=0.8298\n",
      "epoch=114, train_loss=0.4641,valid_loss=0.5587,, acc_train=0.8528,acc_valid=0.8300\n",
      "epoch=115, train_loss=0.4629,valid_loss=0.5576,, acc_train=0.8531,acc_valid=0.8301\n",
      "epoch=116, train_loss=0.4617,valid_loss=0.5567,, acc_train=0.8534,acc_valid=0.8303\n",
      "epoch=117, train_loss=0.4605,valid_loss=0.5557,, acc_train=0.8538,acc_valid=0.8303\n",
      "epoch=118, train_loss=0.4593,valid_loss=0.5547,, acc_train=0.8540,acc_valid=0.8307\n",
      "epoch=119, train_loss=0.4582,valid_loss=0.5538,, acc_train=0.8541,acc_valid=0.8311\n",
      "epoch=120, train_loss=0.4571,valid_loss=0.5529,, acc_train=0.8544,acc_valid=0.8311\n",
      "epoch=121, train_loss=0.4559,valid_loss=0.5519,, acc_train=0.8548,acc_valid=0.8317\n",
      "epoch=122, train_loss=0.4548,valid_loss=0.5511,, acc_train=0.8551,acc_valid=0.8315\n",
      "epoch=123, train_loss=0.4537,valid_loss=0.5502,, acc_train=0.8553,acc_valid=0.8314\n",
      "epoch=124, train_loss=0.4527,valid_loss=0.5493,, acc_train=0.8554,acc_valid=0.8317\n",
      "epoch=125, train_loss=0.4516,valid_loss=0.5484,, acc_train=0.8556,acc_valid=0.8317\n",
      "epoch=126, train_loss=0.4506,valid_loss=0.5476,, acc_train=0.8558,acc_valid=0.8317\n",
      "epoch=127, train_loss=0.4495,valid_loss=0.5467,, acc_train=0.8560,acc_valid=0.8320\n",
      "epoch=128, train_loss=0.4485,valid_loss=0.5459,, acc_train=0.8562,acc_valid=0.8321\n",
      "epoch=129, train_loss=0.4475,valid_loss=0.5451,, acc_train=0.8562,acc_valid=0.8324\n",
      "epoch=130, train_loss=0.4465,valid_loss=0.5442,, acc_train=0.8564,acc_valid=0.8327\n",
      "epoch=131, train_loss=0.4456,valid_loss=0.5434,, acc_train=0.8566,acc_valid=0.8328\n",
      "epoch=132, train_loss=0.4446,valid_loss=0.5427,, acc_train=0.8568,acc_valid=0.8329\n",
      "epoch=133, train_loss=0.4436,valid_loss=0.5419,, acc_train=0.8569,acc_valid=0.8329\n",
      "epoch=134, train_loss=0.4427,valid_loss=0.5411,, acc_train=0.8570,acc_valid=0.8331\n",
      "epoch=135, train_loss=0.4418,valid_loss=0.5404,, acc_train=0.8571,acc_valid=0.8332\n",
      "epoch=136, train_loss=0.4408,valid_loss=0.5396,, acc_train=0.8575,acc_valid=0.8333\n",
      "epoch=137, train_loss=0.4399,valid_loss=0.5389,, acc_train=0.8577,acc_valid=0.8334\n",
      "epoch=138, train_loss=0.4390,valid_loss=0.5381,, acc_train=0.8579,acc_valid=0.8334\n",
      "epoch=139, train_loss=0.4382,valid_loss=0.5374,, acc_train=0.8582,acc_valid=0.8335\n",
      "epoch=140, train_loss=0.4373,valid_loss=0.5367,, acc_train=0.8583,acc_valid=0.8335\n",
      "epoch=141, train_loss=0.4364,valid_loss=0.5360,, acc_train=0.8584,acc_valid=0.8336\n",
      "epoch=142, train_loss=0.4356,valid_loss=0.5353,, acc_train=0.8586,acc_valid=0.8340\n",
      "epoch=143, train_loss=0.4347,valid_loss=0.5346,, acc_train=0.8587,acc_valid=0.8339\n",
      "epoch=144, train_loss=0.4339,valid_loss=0.5339,, acc_train=0.8588,acc_valid=0.8342\n",
      "epoch=145, train_loss=0.4331,valid_loss=0.5332,, acc_train=0.8590,acc_valid=0.8341\n",
      "epoch=146, train_loss=0.4323,valid_loss=0.5326,, acc_train=0.8591,acc_valid=0.8341\n",
      "epoch=147, train_loss=0.4314,valid_loss=0.5320,, acc_train=0.8593,acc_valid=0.8347\n",
      "epoch=148, train_loss=0.4306,valid_loss=0.5313,, acc_train=0.8594,acc_valid=0.8347\n",
      "epoch=149, train_loss=0.4298,valid_loss=0.5307,, acc_train=0.8596,acc_valid=0.8347\n",
      "epoch=150, train_loss=0.4290,valid_loss=0.5300,, acc_train=0.8599,acc_valid=0.8349\n",
      "epoch=151, train_loss=0.4283,valid_loss=0.5294,, acc_train=0.8601,acc_valid=0.8350\n",
      "epoch=152, train_loss=0.4275,valid_loss=0.5288,, acc_train=0.8604,acc_valid=0.8355\n",
      "epoch=153, train_loss=0.4267,valid_loss=0.5282,, acc_train=0.8605,acc_valid=0.8357\n",
      "epoch=154, train_loss=0.4259,valid_loss=0.5276,, acc_train=0.8608,acc_valid=0.8358\n",
      "epoch=155, train_loss=0.4252,valid_loss=0.5270,, acc_train=0.8609,acc_valid=0.8361\n",
      "epoch=156, train_loss=0.4245,valid_loss=0.5264,, acc_train=0.8610,acc_valid=0.8363\n",
      "epoch=157, train_loss=0.4237,valid_loss=0.5258,, acc_train=0.8612,acc_valid=0.8362\n",
      "epoch=158, train_loss=0.4230,valid_loss=0.5252,, acc_train=0.8615,acc_valid=0.8360\n",
      "epoch=159, train_loss=0.4223,valid_loss=0.5246,, acc_train=0.8615,acc_valid=0.8363\n",
      "epoch=160, train_loss=0.4216,valid_loss=0.5240,, acc_train=0.8616,acc_valid=0.8364\n",
      "epoch=161, train_loss=0.4209,valid_loss=0.5234,, acc_train=0.8617,acc_valid=0.8365\n",
      "epoch=162, train_loss=0.4202,valid_loss=0.5229,, acc_train=0.8618,acc_valid=0.8367\n",
      "epoch=163, train_loss=0.4195,valid_loss=0.5223,, acc_train=0.8619,acc_valid=0.8367\n",
      "epoch=164, train_loss=0.4188,valid_loss=0.5217,, acc_train=0.8619,acc_valid=0.8367\n",
      "epoch=165, train_loss=0.4181,valid_loss=0.5211,, acc_train=0.8621,acc_valid=0.8366\n",
      "epoch=166, train_loss=0.4175,valid_loss=0.5206,, acc_train=0.8622,acc_valid=0.8363\n",
      "epoch=167, train_loss=0.4168,valid_loss=0.5200,, acc_train=0.8625,acc_valid=0.8366\n",
      "epoch=168, train_loss=0.4162,valid_loss=0.5195,, acc_train=0.8626,acc_valid=0.8367\n",
      "epoch=169, train_loss=0.4155,valid_loss=0.5189,, acc_train=0.8627,acc_valid=0.8367\n",
      "epoch=170, train_loss=0.4149,valid_loss=0.5184,, acc_train=0.8629,acc_valid=0.8369\n",
      "epoch=171, train_loss=0.4142,valid_loss=0.5179,, acc_train=0.8629,acc_valid=0.8371\n",
      "epoch=172, train_loss=0.4136,valid_loss=0.5174,, acc_train=0.8631,acc_valid=0.8372\n",
      "epoch=173, train_loss=0.4130,valid_loss=0.5169,, acc_train=0.8634,acc_valid=0.8372\n",
      "epoch=174, train_loss=0.4124,valid_loss=0.5164,, acc_train=0.8635,acc_valid=0.8372\n",
      "epoch=175, train_loss=0.4118,valid_loss=0.5159,, acc_train=0.8636,acc_valid=0.8373\n",
      "epoch=176, train_loss=0.4112,valid_loss=0.5154,, acc_train=0.8637,acc_valid=0.8374\n",
      "epoch=177, train_loss=0.4106,valid_loss=0.5149,, acc_train=0.8637,acc_valid=0.8378\n",
      "epoch=178, train_loss=0.4100,valid_loss=0.5144,, acc_train=0.8639,acc_valid=0.8378\n",
      "epoch=179, train_loss=0.4094,valid_loss=0.5139,, acc_train=0.8641,acc_valid=0.8378\n",
      "epoch=180, train_loss=0.4088,valid_loss=0.5134,, acc_train=0.8642,acc_valid=0.8379\n",
      "epoch=181, train_loss=0.4082,valid_loss=0.5130,, acc_train=0.8641,acc_valid=0.8379\n",
      "epoch=182, train_loss=0.4077,valid_loss=0.5125,, acc_train=0.8644,acc_valid=0.8382\n",
      "epoch=183, train_loss=0.4071,valid_loss=0.5121,, acc_train=0.8645,acc_valid=0.8382\n",
      "epoch=184, train_loss=0.4065,valid_loss=0.5116,, acc_train=0.8648,acc_valid=0.8382\n",
      "epoch=185, train_loss=0.4060,valid_loss=0.5112,, acc_train=0.8650,acc_valid=0.8384\n",
      "epoch=186, train_loss=0.4054,valid_loss=0.5108,, acc_train=0.8652,acc_valid=0.8383\n",
      "epoch=187, train_loss=0.4049,valid_loss=0.5103,, acc_train=0.8652,acc_valid=0.8383\n",
      "epoch=188, train_loss=0.4044,valid_loss=0.5099,, acc_train=0.8654,acc_valid=0.8384\n",
      "epoch=189, train_loss=0.4038,valid_loss=0.5095,, acc_train=0.8655,acc_valid=0.8384\n",
      "epoch=190, train_loss=0.4033,valid_loss=0.5091,, acc_train=0.8656,acc_valid=0.8387\n",
      "epoch=191, train_loss=0.4028,valid_loss=0.5086,, acc_train=0.8656,acc_valid=0.8387\n",
      "epoch=192, train_loss=0.4023,valid_loss=0.5082,, acc_train=0.8657,acc_valid=0.8386\n",
      "epoch=193, train_loss=0.4017,valid_loss=0.5078,, acc_train=0.8658,acc_valid=0.8388\n",
      "epoch=194, train_loss=0.4012,valid_loss=0.5074,, acc_train=0.8659,acc_valid=0.8388\n",
      "epoch=195, train_loss=0.4007,valid_loss=0.5070,, acc_train=0.8660,acc_valid=0.8388\n",
      "epoch=196, train_loss=0.4002,valid_loss=0.5066,, acc_train=0.8661,acc_valid=0.8388\n",
      "epoch=197, train_loss=0.3997,valid_loss=0.5063,, acc_train=0.8662,acc_valid=0.8389\n",
      "epoch=198, train_loss=0.3993,valid_loss=0.5059,, acc_train=0.8662,acc_valid=0.8389\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch=199, train_loss=0.3988,valid_loss=0.5055,, acc_train=0.8664,acc_valid=0.8392\n",
      "epoch=200, train_loss=0.3983,valid_loss=0.5051,, acc_train=0.8665,acc_valid=0.8395\n",
      "epoch=201, train_loss=0.3978,valid_loss=0.5047,, acc_train=0.8667,acc_valid=0.8397\n",
      "epoch=202, train_loss=0.3973,valid_loss=0.5044,, acc_train=0.8669,acc_valid=0.8397\n",
      "epoch=203, train_loss=0.3969,valid_loss=0.5040,, acc_train=0.8670,acc_valid=0.8398\n",
      "epoch=204, train_loss=0.3964,valid_loss=0.5037,, acc_train=0.8670,acc_valid=0.8398\n",
      "epoch=205, train_loss=0.3959,valid_loss=0.5033,, acc_train=0.8671,acc_valid=0.8398\n",
      "epoch=206, train_loss=0.3955,valid_loss=0.5030,, acc_train=0.8673,acc_valid=0.8398\n",
      "epoch=207, train_loss=0.3950,valid_loss=0.5026,, acc_train=0.8674,acc_valid=0.8397\n",
      "epoch=208, train_loss=0.3946,valid_loss=0.5023,, acc_train=0.8676,acc_valid=0.8398\n",
      "epoch=209, train_loss=0.3941,valid_loss=0.5019,, acc_train=0.8677,acc_valid=0.8398\n",
      "epoch=210, train_loss=0.3937,valid_loss=0.5016,, acc_train=0.8677,acc_valid=0.8403\n",
      "epoch=211, train_loss=0.3933,valid_loss=0.5013,, acc_train=0.8678,acc_valid=0.8404\n",
      "epoch=212, train_loss=0.3928,valid_loss=0.5009,, acc_train=0.8678,acc_valid=0.8404\n",
      "epoch=213, train_loss=0.3924,valid_loss=0.5006,, acc_train=0.8680,acc_valid=0.8403\n",
      "epoch=214, train_loss=0.3920,valid_loss=0.5003,, acc_train=0.8680,acc_valid=0.8401\n",
      "epoch=215, train_loss=0.3916,valid_loss=0.4999,, acc_train=0.8681,acc_valid=0.8405\n",
      "epoch=216, train_loss=0.3912,valid_loss=0.4996,, acc_train=0.8683,acc_valid=0.8406\n",
      "epoch=217, train_loss=0.3907,valid_loss=0.4993,, acc_train=0.8686,acc_valid=0.8406\n",
      "epoch=218, train_loss=0.3903,valid_loss=0.4990,, acc_train=0.8686,acc_valid=0.8407\n",
      "epoch=219, train_loss=0.3899,valid_loss=0.4987,, acc_train=0.8687,acc_valid=0.8409\n",
      "epoch=220, train_loss=0.3895,valid_loss=0.4984,, acc_train=0.8688,acc_valid=0.8411\n",
      "epoch=221, train_loss=0.3891,valid_loss=0.4981,, acc_train=0.8688,acc_valid=0.8411\n",
      "epoch=222, train_loss=0.3887,valid_loss=0.4978,, acc_train=0.8691,acc_valid=0.8413\n",
      "epoch=223, train_loss=0.3883,valid_loss=0.4975,, acc_train=0.8691,acc_valid=0.8412\n",
      "epoch=224, train_loss=0.3880,valid_loss=0.4971,, acc_train=0.8692,acc_valid=0.8413\n",
      "epoch=225, train_loss=0.3876,valid_loss=0.4968,, acc_train=0.8693,acc_valid=0.8413\n",
      "epoch=226, train_loss=0.3872,valid_loss=0.4965,, acc_train=0.8695,acc_valid=0.8414\n",
      "epoch=227, train_loss=0.3868,valid_loss=0.4962,, acc_train=0.8695,acc_valid=0.8415\n",
      "epoch=228, train_loss=0.3864,valid_loss=0.4959,, acc_train=0.8696,acc_valid=0.8417\n",
      "epoch=229, train_loss=0.3860,valid_loss=0.4957,, acc_train=0.8698,acc_valid=0.8418\n",
      "epoch=230, train_loss=0.3856,valid_loss=0.4954,, acc_train=0.8698,acc_valid=0.8421\n",
      "epoch=231, train_loss=0.3853,valid_loss=0.4951,, acc_train=0.8699,acc_valid=0.8422\n",
      "epoch=232, train_loss=0.3849,valid_loss=0.4948,, acc_train=0.8699,acc_valid=0.8422\n",
      "epoch=233, train_loss=0.3845,valid_loss=0.4945,, acc_train=0.8700,acc_valid=0.8422\n",
      "epoch=234, train_loss=0.3842,valid_loss=0.4942,, acc_train=0.8702,acc_valid=0.8424\n",
      "epoch=235, train_loss=0.3838,valid_loss=0.4940,, acc_train=0.8703,acc_valid=0.8424\n",
      "epoch=236, train_loss=0.3835,valid_loss=0.4937,, acc_train=0.8703,acc_valid=0.8424\n",
      "epoch=237, train_loss=0.3831,valid_loss=0.4934,, acc_train=0.8705,acc_valid=0.8425\n",
      "epoch=238, train_loss=0.3827,valid_loss=0.4932,, acc_train=0.8705,acc_valid=0.8427\n",
      "epoch=239, train_loss=0.3824,valid_loss=0.4929,, acc_train=0.8705,acc_valid=0.8428\n",
      "epoch=240, train_loss=0.3820,valid_loss=0.4927,, acc_train=0.8706,acc_valid=0.8428\n",
      "epoch=241, train_loss=0.3817,valid_loss=0.4924,, acc_train=0.8708,acc_valid=0.8428\n",
      "epoch=242, train_loss=0.3814,valid_loss=0.4921,, acc_train=0.8709,acc_valid=0.8429\n",
      "epoch=243, train_loss=0.3810,valid_loss=0.4918,, acc_train=0.8709,acc_valid=0.8430\n",
      "epoch=244, train_loss=0.3807,valid_loss=0.4916,, acc_train=0.8709,acc_valid=0.8429\n",
      "epoch=245, train_loss=0.3803,valid_loss=0.4913,, acc_train=0.8710,acc_valid=0.8430\n",
      "epoch=246, train_loss=0.3800,valid_loss=0.4911,, acc_train=0.8711,acc_valid=0.8432\n",
      "epoch=247, train_loss=0.3797,valid_loss=0.4908,, acc_train=0.8712,acc_valid=0.8431\n",
      "epoch=248, train_loss=0.3794,valid_loss=0.4906,, acc_train=0.8713,acc_valid=0.8431\n",
      "epoch=249, train_loss=0.3790,valid_loss=0.4904,, acc_train=0.8715,acc_valid=0.8432\n",
      "epoch=250, train_loss=0.3787,valid_loss=0.4901,, acc_train=0.8716,acc_valid=0.8433\n",
      "epoch=251, train_loss=0.3784,valid_loss=0.4899,, acc_train=0.8717,acc_valid=0.8433\n",
      "epoch=252, train_loss=0.3781,valid_loss=0.4896,, acc_train=0.8717,acc_valid=0.8435\n",
      "epoch=253, train_loss=0.3778,valid_loss=0.4894,, acc_train=0.8718,acc_valid=0.8435\n",
      "epoch=254, train_loss=0.3775,valid_loss=0.4892,, acc_train=0.8717,acc_valid=0.8435\n",
      "epoch=255, train_loss=0.3772,valid_loss=0.4890,, acc_train=0.8718,acc_valid=0.8437\n",
      "epoch=256, train_loss=0.3769,valid_loss=0.4887,, acc_train=0.8719,acc_valid=0.8439\n",
      "epoch=257, train_loss=0.3765,valid_loss=0.4885,, acc_train=0.8719,acc_valid=0.8439\n",
      "epoch=258, train_loss=0.3762,valid_loss=0.4883,, acc_train=0.8719,acc_valid=0.8440\n",
      "epoch=259, train_loss=0.3759,valid_loss=0.4881,, acc_train=0.8720,acc_valid=0.8439\n",
      "epoch=260, train_loss=0.3756,valid_loss=0.4879,, acc_train=0.8720,acc_valid=0.8439\n",
      "epoch=261, train_loss=0.3754,valid_loss=0.4877,, acc_train=0.8721,acc_valid=0.8439\n",
      "epoch=262, train_loss=0.3751,valid_loss=0.4874,, acc_train=0.8722,acc_valid=0.8441\n",
      "epoch=263, train_loss=0.3748,valid_loss=0.4872,, acc_train=0.8722,acc_valid=0.8441\n",
      "epoch=264, train_loss=0.3745,valid_loss=0.4870,, acc_train=0.8724,acc_valid=0.8442\n",
      "epoch=265, train_loss=0.3742,valid_loss=0.4868,, acc_train=0.8725,acc_valid=0.8443\n",
      "epoch=266, train_loss=0.3739,valid_loss=0.4866,, acc_train=0.8726,acc_valid=0.8443\n",
      "epoch=267, train_loss=0.3736,valid_loss=0.4864,, acc_train=0.8726,acc_valid=0.8443\n",
      "epoch=268, train_loss=0.3733,valid_loss=0.4862,, acc_train=0.8727,acc_valid=0.8444\n",
      "epoch=269, train_loss=0.3731,valid_loss=0.4860,, acc_train=0.8727,acc_valid=0.8443\n",
      "epoch=270, train_loss=0.3728,valid_loss=0.4858,, acc_train=0.8727,acc_valid=0.8446\n",
      "epoch=271, train_loss=0.3725,valid_loss=0.4857,, acc_train=0.8728,acc_valid=0.8446\n",
      "epoch=272, train_loss=0.3722,valid_loss=0.4855,, acc_train=0.8729,acc_valid=0.8446\n",
      "epoch=273, train_loss=0.3720,valid_loss=0.4853,, acc_train=0.8729,acc_valid=0.8445\n",
      "epoch=274, train_loss=0.3717,valid_loss=0.4851,, acc_train=0.8729,acc_valid=0.8447\n",
      "epoch=275, train_loss=0.3714,valid_loss=0.4849,, acc_train=0.8729,acc_valid=0.8446\n",
      "epoch=276, train_loss=0.3712,valid_loss=0.4847,, acc_train=0.8730,acc_valid=0.8447\n",
      "epoch=277, train_loss=0.3709,valid_loss=0.4845,, acc_train=0.8731,acc_valid=0.8446\n",
      "epoch=278, train_loss=0.3706,valid_loss=0.4844,, acc_train=0.8732,acc_valid=0.8446\n",
      "epoch=279, train_loss=0.3704,valid_loss=0.4842,, acc_train=0.8732,acc_valid=0.8447\n",
      "epoch=280, train_loss=0.3701,valid_loss=0.4840,, acc_train=0.8732,acc_valid=0.8447\n",
      "epoch=281, train_loss=0.3699,valid_loss=0.4838,, acc_train=0.8733,acc_valid=0.8448\n",
      "epoch=282, train_loss=0.3696,valid_loss=0.4837,, acc_train=0.8734,acc_valid=0.8447\n",
      "epoch=283, train_loss=0.3694,valid_loss=0.4835,, acc_train=0.8734,acc_valid=0.8446\n",
      "epoch=284, train_loss=0.3691,valid_loss=0.4833,, acc_train=0.8734,acc_valid=0.8447\n",
      "epoch=285, train_loss=0.3689,valid_loss=0.4831,, acc_train=0.8735,acc_valid=0.8445\n",
      "epoch=286, train_loss=0.3686,valid_loss=0.4830,, acc_train=0.8735,acc_valid=0.8446\n",
      "epoch=287, train_loss=0.3684,valid_loss=0.4828,, acc_train=0.8736,acc_valid=0.8447\n",
      "epoch=288, train_loss=0.3681,valid_loss=0.4827,, acc_train=0.8736,acc_valid=0.8447\n",
      "epoch=289, train_loss=0.3679,valid_loss=0.4825,, acc_train=0.8736,acc_valid=0.8447\n",
      "epoch=290, train_loss=0.3676,valid_loss=0.4823,, acc_train=0.8737,acc_valid=0.8447\n",
      "epoch=291, train_loss=0.3674,valid_loss=0.4822,, acc_train=0.8738,acc_valid=0.8447\n",
      "epoch=292, train_loss=0.3672,valid_loss=0.4820,, acc_train=0.8738,acc_valid=0.8446\n",
      "epoch=293, train_loss=0.3669,valid_loss=0.4819,, acc_train=0.8739,acc_valid=0.8446\n",
      "epoch=294, train_loss=0.3667,valid_loss=0.4817,, acc_train=0.8739,acc_valid=0.8446\n",
      "epoch=295, train_loss=0.3665,valid_loss=0.4816,, acc_train=0.8740,acc_valid=0.8446\n",
      "epoch=296, train_loss=0.3662,valid_loss=0.4814,, acc_train=0.8741,acc_valid=0.8443\n",
      "epoch=297, train_loss=0.3660,valid_loss=0.4813,, acc_train=0.8740,acc_valid=0.8443\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch=298, train_loss=0.3658,valid_loss=0.4811,, acc_train=0.8741,acc_valid=0.8443\n",
      "epoch=299, train_loss=0.3655,valid_loss=0.4809,, acc_train=0.8742,acc_valid=0.8443\n",
      "epoch=300, train_loss=0.3653,valid_loss=0.4808,, acc_train=0.8743,acc_valid=0.8443\n",
      "epoch=301, train_loss=0.3651,valid_loss=0.4806,, acc_train=0.8744,acc_valid=0.8443\n",
      "epoch=302, train_loss=0.3649,valid_loss=0.4805,, acc_train=0.8744,acc_valid=0.8445\n",
      "epoch=303, train_loss=0.3646,valid_loss=0.4804,, acc_train=0.8745,acc_valid=0.8443\n",
      "epoch=304, train_loss=0.3644,valid_loss=0.4802,, acc_train=0.8745,acc_valid=0.8443\n",
      "epoch=305, train_loss=0.3642,valid_loss=0.4801,, acc_train=0.8744,acc_valid=0.8444\n",
      "epoch=306, train_loss=0.3640,valid_loss=0.4800,, acc_train=0.8745,acc_valid=0.8446\n",
      "epoch=307, train_loss=0.3638,valid_loss=0.4798,, acc_train=0.8746,acc_valid=0.8444\n",
      "epoch=308, train_loss=0.3635,valid_loss=0.4797,, acc_train=0.8747,acc_valid=0.8443\n",
      "epoch=309, train_loss=0.3633,valid_loss=0.4796,, acc_train=0.8747,acc_valid=0.8445\n",
      "epoch=310, train_loss=0.3631,valid_loss=0.4794,, acc_train=0.8748,acc_valid=0.8445\n",
      "epoch=311, train_loss=0.3629,valid_loss=0.4793,, acc_train=0.8748,acc_valid=0.8446\n",
      "epoch=312, train_loss=0.3627,valid_loss=0.4792,, acc_train=0.8749,acc_valid=0.8445\n",
      "epoch=313, train_loss=0.3625,valid_loss=0.4790,, acc_train=0.8750,acc_valid=0.8443\n",
      "epoch=314, train_loss=0.3623,valid_loss=0.4789,, acc_train=0.8750,acc_valid=0.8445\n",
      "epoch=315, train_loss=0.3621,valid_loss=0.4788,, acc_train=0.8751,acc_valid=0.8445\n",
      "epoch=316, train_loss=0.3619,valid_loss=0.4787,, acc_train=0.8751,acc_valid=0.8444\n",
      "epoch=317, train_loss=0.3617,valid_loss=0.4785,, acc_train=0.8752,acc_valid=0.8445\n",
      "epoch=318, train_loss=0.3615,valid_loss=0.4784,, acc_train=0.8753,acc_valid=0.8445\n",
      "epoch=319, train_loss=0.3613,valid_loss=0.4783,, acc_train=0.8754,acc_valid=0.8447\n",
      "epoch=320, train_loss=0.3611,valid_loss=0.4782,, acc_train=0.8754,acc_valid=0.8447\n",
      "epoch=321, train_loss=0.3609,valid_loss=0.4781,, acc_train=0.8755,acc_valid=0.8447\n",
      "epoch=322, train_loss=0.3607,valid_loss=0.4779,, acc_train=0.8755,acc_valid=0.8447\n",
      "epoch=323, train_loss=0.3605,valid_loss=0.4778,, acc_train=0.8756,acc_valid=0.8446\n",
      "epoch=324, train_loss=0.3603,valid_loss=0.4777,, acc_train=0.8757,acc_valid=0.8446\n",
      "epoch=325, train_loss=0.3601,valid_loss=0.4776,, acc_train=0.8758,acc_valid=0.8447\n",
      "epoch=326, train_loss=0.3599,valid_loss=0.4775,, acc_train=0.8758,acc_valid=0.8445\n",
      "epoch=327, train_loss=0.3597,valid_loss=0.4774,, acc_train=0.8760,acc_valid=0.8447\n",
      "epoch=328, train_loss=0.3595,valid_loss=0.4773,, acc_train=0.8760,acc_valid=0.8447\n",
      "epoch=329, train_loss=0.3593,valid_loss=0.4772,, acc_train=0.8761,acc_valid=0.8446\n",
      "epoch=330, train_loss=0.3591,valid_loss=0.4770,, acc_train=0.8761,acc_valid=0.8446\n",
      "epoch=331, train_loss=0.3589,valid_loss=0.4769,, acc_train=0.8762,acc_valid=0.8446\n",
      "epoch=332, train_loss=0.3588,valid_loss=0.4768,, acc_train=0.8762,acc_valid=0.8446\n",
      "epoch=333, train_loss=0.3586,valid_loss=0.4767,, acc_train=0.8763,acc_valid=0.8447\n",
      "epoch=334, train_loss=0.3584,valid_loss=0.4766,, acc_train=0.8763,acc_valid=0.8450\n",
      "epoch=335, train_loss=0.3582,valid_loss=0.4765,, acc_train=0.8764,acc_valid=0.8450\n",
      "epoch=336, train_loss=0.3580,valid_loss=0.4764,, acc_train=0.8763,acc_valid=0.8450\n",
      "epoch=337, train_loss=0.3578,valid_loss=0.4763,, acc_train=0.8764,acc_valid=0.8451\n",
      "epoch=338, train_loss=0.3577,valid_loss=0.4762,, acc_train=0.8764,acc_valid=0.8450\n",
      "epoch=339, train_loss=0.3575,valid_loss=0.4761,, acc_train=0.8765,acc_valid=0.8450\n",
      "epoch=340, train_loss=0.3573,valid_loss=0.4760,, acc_train=0.8766,acc_valid=0.8447\n",
      "epoch=341, train_loss=0.3571,valid_loss=0.4759,, acc_train=0.8767,acc_valid=0.8447\n",
      "epoch=342, train_loss=0.3570,valid_loss=0.4758,, acc_train=0.8767,acc_valid=0.8446\n",
      "epoch=343, train_loss=0.3568,valid_loss=0.4757,, acc_train=0.8769,acc_valid=0.8446\n",
      "epoch=344, train_loss=0.3566,valid_loss=0.4756,, acc_train=0.8769,acc_valid=0.8447\n",
      "epoch=345, train_loss=0.3564,valid_loss=0.4755,, acc_train=0.8769,acc_valid=0.8447\n",
      "epoch=346, train_loss=0.3563,valid_loss=0.4755,, acc_train=0.8769,acc_valid=0.8447\n",
      "epoch=347, train_loss=0.3561,valid_loss=0.4754,, acc_train=0.8770,acc_valid=0.8447\n",
      "epoch=348, train_loss=0.3559,valid_loss=0.4753,, acc_train=0.8771,acc_valid=0.8447\n",
      "epoch=349, train_loss=0.3558,valid_loss=0.4752,, acc_train=0.8771,acc_valid=0.8447\n",
      "epoch=350, train_loss=0.3556,valid_loss=0.4751,, acc_train=0.8772,acc_valid=0.8450\n",
      "epoch=351, train_loss=0.3554,valid_loss=0.4750,, acc_train=0.8772,acc_valid=0.8450\n",
      "epoch=352, train_loss=0.3553,valid_loss=0.4749,, acc_train=0.8772,acc_valid=0.8452\n",
      "epoch=353, train_loss=0.3551,valid_loss=0.4748,, acc_train=0.8774,acc_valid=0.8450\n",
      "epoch=354, train_loss=0.3549,valid_loss=0.4748,, acc_train=0.8775,acc_valid=0.8450\n",
      "epoch=355, train_loss=0.3548,valid_loss=0.4747,, acc_train=0.8775,acc_valid=0.8448\n",
      "epoch=356, train_loss=0.3546,valid_loss=0.4746,, acc_train=0.8774,acc_valid=0.8448\n",
      "epoch=357, train_loss=0.3544,valid_loss=0.4745,, acc_train=0.8775,acc_valid=0.8450\n",
      "epoch=358, train_loss=0.3543,valid_loss=0.4744,, acc_train=0.8776,acc_valid=0.8449\n",
      "epoch=359, train_loss=0.3541,valid_loss=0.4743,, acc_train=0.8777,acc_valid=0.8449\n",
      "epoch=360, train_loss=0.3540,valid_loss=0.4743,, acc_train=0.8778,acc_valid=0.8451\n",
      "epoch=361, train_loss=0.3538,valid_loss=0.4742,, acc_train=0.8778,acc_valid=0.8453\n",
      "epoch=362, train_loss=0.3537,valid_loss=0.4741,, acc_train=0.8779,acc_valid=0.8452\n",
      "epoch=363, train_loss=0.3535,valid_loss=0.4740,, acc_train=0.8779,acc_valid=0.8452\n",
      "epoch=364, train_loss=0.3533,valid_loss=0.4740,, acc_train=0.8780,acc_valid=0.8452\n",
      "epoch=365, train_loss=0.3532,valid_loss=0.4739,, acc_train=0.8779,acc_valid=0.8451\n",
      "epoch=366, train_loss=0.3530,valid_loss=0.4738,, acc_train=0.8780,acc_valid=0.8452\n",
      "epoch=367, train_loss=0.3529,valid_loss=0.4737,, acc_train=0.8780,acc_valid=0.8452\n",
      "epoch=368, train_loss=0.3527,valid_loss=0.4737,, acc_train=0.8781,acc_valid=0.8453\n",
      "epoch=369, train_loss=0.3526,valid_loss=0.4736,, acc_train=0.8781,acc_valid=0.8452\n",
      "epoch=370, train_loss=0.3524,valid_loss=0.4735,, acc_train=0.8782,acc_valid=0.8452\n",
      "epoch=371, train_loss=0.3523,valid_loss=0.4734,, acc_train=0.8783,acc_valid=0.8454\n",
      "epoch=372, train_loss=0.3521,valid_loss=0.4734,, acc_train=0.8783,acc_valid=0.8455\n",
      "epoch=373, train_loss=0.3520,valid_loss=0.4733,, acc_train=0.8783,acc_valid=0.8455\n",
      "epoch=374, train_loss=0.3519,valid_loss=0.4732,, acc_train=0.8783,acc_valid=0.8456\n",
      "epoch=375, train_loss=0.3517,valid_loss=0.4732,, acc_train=0.8783,acc_valid=0.8454\n",
      "epoch=376, train_loss=0.3516,valid_loss=0.4731,, acc_train=0.8783,acc_valid=0.8455\n",
      "epoch=377, train_loss=0.3514,valid_loss=0.4730,, acc_train=0.8783,acc_valid=0.8456\n",
      "epoch=378, train_loss=0.3513,valid_loss=0.4730,, acc_train=0.8783,acc_valid=0.8457\n",
      "epoch=379, train_loss=0.3511,valid_loss=0.4729,, acc_train=0.8783,acc_valid=0.8456\n",
      "epoch=380, train_loss=0.3510,valid_loss=0.4728,, acc_train=0.8783,acc_valid=0.8457\n",
      "epoch=381, train_loss=0.3509,valid_loss=0.4728,, acc_train=0.8784,acc_valid=0.8457\n",
      "epoch=382, train_loss=0.3507,valid_loss=0.4727,, acc_train=0.8784,acc_valid=0.8457\n",
      "epoch=383, train_loss=0.3506,valid_loss=0.4726,, acc_train=0.8784,acc_valid=0.8456\n",
      "epoch=384, train_loss=0.3504,valid_loss=0.4726,, acc_train=0.8786,acc_valid=0.8456\n",
      "epoch=385, train_loss=0.3503,valid_loss=0.4725,, acc_train=0.8786,acc_valid=0.8457\n",
      "epoch=386, train_loss=0.3502,valid_loss=0.4725,, acc_train=0.8786,acc_valid=0.8458\n",
      "epoch=387, train_loss=0.3500,valid_loss=0.4724,, acc_train=0.8786,acc_valid=0.8458\n",
      "epoch=388, train_loss=0.3499,valid_loss=0.4723,, acc_train=0.8786,acc_valid=0.8458\n",
      "epoch=389, train_loss=0.3498,valid_loss=0.4723,, acc_train=0.8787,acc_valid=0.8459\n",
      "epoch=390, train_loss=0.3496,valid_loss=0.4722,, acc_train=0.8787,acc_valid=0.8459\n",
      "epoch=391, train_loss=0.3495,valid_loss=0.4722,, acc_train=0.8786,acc_valid=0.8459\n",
      "epoch=392, train_loss=0.3494,valid_loss=0.4721,, acc_train=0.8787,acc_valid=0.8457\n",
      "epoch=393, train_loss=0.3492,valid_loss=0.4721,, acc_train=0.8787,acc_valid=0.8457\n",
      "epoch=394, train_loss=0.3491,valid_loss=0.4720,, acc_train=0.8787,acc_valid=0.8456\n",
      "epoch=395, train_loss=0.3490,valid_loss=0.4720,, acc_train=0.8787,acc_valid=0.8456\n",
      "epoch=396, train_loss=0.3488,valid_loss=0.4719,, acc_train=0.8788,acc_valid=0.8455\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch=397, train_loss=0.3487,valid_loss=0.4719,, acc_train=0.8788,acc_valid=0.8456\n",
      "epoch=398, train_loss=0.3486,valid_loss=0.4718,, acc_train=0.8789,acc_valid=0.8455\n",
      "epoch=399, train_loss=0.3484,valid_loss=0.4717,, acc_train=0.8789,acc_valid=0.8455\n",
      "epoch=400, train_loss=0.3483,valid_loss=0.4717,, acc_train=0.8789,acc_valid=0.8456\n",
      "epoch=401, train_loss=0.3482,valid_loss=0.4716,, acc_train=0.8790,acc_valid=0.8457\n",
      "epoch=402, train_loss=0.3481,valid_loss=0.4716,, acc_train=0.8790,acc_valid=0.8458\n",
      "epoch=403, train_loss=0.3479,valid_loss=0.4715,, acc_train=0.8791,acc_valid=0.8459\n",
      "epoch=404, train_loss=0.3478,valid_loss=0.4715,, acc_train=0.8792,acc_valid=0.8459\n",
      "epoch=405, train_loss=0.3477,valid_loss=0.4715,, acc_train=0.8792,acc_valid=0.8459\n",
      "epoch=406, train_loss=0.3476,valid_loss=0.4714,, acc_train=0.8793,acc_valid=0.8459\n",
      "epoch=407, train_loss=0.3474,valid_loss=0.4714,, acc_train=0.8793,acc_valid=0.8460\n",
      "epoch=408, train_loss=0.3473,valid_loss=0.4713,, acc_train=0.8793,acc_valid=0.8460\n",
      "epoch=409, train_loss=0.3472,valid_loss=0.4713,, acc_train=0.8794,acc_valid=0.8462\n",
      "epoch=410, train_loss=0.3471,valid_loss=0.4712,, acc_train=0.8794,acc_valid=0.8462\n",
      "epoch=411, train_loss=0.3470,valid_loss=0.4712,, acc_train=0.8794,acc_valid=0.8462\n",
      "epoch=412, train_loss=0.3468,valid_loss=0.4711,, acc_train=0.8794,acc_valid=0.8462\n",
      "epoch=413, train_loss=0.3467,valid_loss=0.4711,, acc_train=0.8794,acc_valid=0.8461\n",
      "epoch=414, train_loss=0.3466,valid_loss=0.4710,, acc_train=0.8794,acc_valid=0.8461\n",
      "epoch=415, train_loss=0.3465,valid_loss=0.4710,, acc_train=0.8794,acc_valid=0.8460\n",
      "epoch=416, train_loss=0.3464,valid_loss=0.4710,, acc_train=0.8794,acc_valid=0.8460\n",
      "epoch=417, train_loss=0.3463,valid_loss=0.4709,, acc_train=0.8794,acc_valid=0.8460\n",
      "epoch=418, train_loss=0.3461,valid_loss=0.4709,, acc_train=0.8795,acc_valid=0.8460\n",
      "epoch=419, train_loss=0.3460,valid_loss=0.4708,, acc_train=0.8795,acc_valid=0.8461\n",
      "epoch=420, train_loss=0.3459,valid_loss=0.4708,, acc_train=0.8795,acc_valid=0.8460\n",
      "epoch=421, train_loss=0.3458,valid_loss=0.4708,, acc_train=0.8795,acc_valid=0.8460\n",
      "epoch=422, train_loss=0.3457,valid_loss=0.4707,, acc_train=0.8796,acc_valid=0.8459\n",
      "epoch=423, train_loss=0.3456,valid_loss=0.4707,, acc_train=0.8796,acc_valid=0.8459\n",
      "epoch=424, train_loss=0.3455,valid_loss=0.4706,, acc_train=0.8797,acc_valid=0.8459\n",
      "epoch=425, train_loss=0.3453,valid_loss=0.4706,, acc_train=0.8796,acc_valid=0.8460\n",
      "epoch=426, train_loss=0.3452,valid_loss=0.4706,, acc_train=0.8796,acc_valid=0.8462\n",
      "epoch=427, train_loss=0.3451,valid_loss=0.4705,, acc_train=0.8797,acc_valid=0.8462\n",
      "epoch=428, train_loss=0.3450,valid_loss=0.4705,, acc_train=0.8797,acc_valid=0.8462\n",
      "epoch=429, train_loss=0.3449,valid_loss=0.4705,, acc_train=0.8798,acc_valid=0.8461\n",
      "epoch=430, train_loss=0.3448,valid_loss=0.4704,, acc_train=0.8797,acc_valid=0.8461\n",
      "epoch=431, train_loss=0.3447,valid_loss=0.4704,, acc_train=0.8798,acc_valid=0.8461\n",
      "epoch=432, train_loss=0.3446,valid_loss=0.4704,, acc_train=0.8798,acc_valid=0.8462\n",
      "epoch=433, train_loss=0.3445,valid_loss=0.4703,, acc_train=0.8799,acc_valid=0.8462\n",
      "epoch=434, train_loss=0.3444,valid_loss=0.4703,, acc_train=0.8799,acc_valid=0.8462\n",
      "epoch=435, train_loss=0.3443,valid_loss=0.4703,, acc_train=0.8800,acc_valid=0.8462\n",
      "epoch=436, train_loss=0.3441,valid_loss=0.4702,, acc_train=0.8800,acc_valid=0.8462\n",
      "epoch=437, train_loss=0.3440,valid_loss=0.4702,, acc_train=0.8800,acc_valid=0.8461\n",
      "epoch=438, train_loss=0.3439,valid_loss=0.4702,, acc_train=0.8801,acc_valid=0.8460\n",
      "epoch=439, train_loss=0.3438,valid_loss=0.4701,, acc_train=0.8802,acc_valid=0.8459\n",
      "epoch=440, train_loss=0.3437,valid_loss=0.4701,, acc_train=0.8802,acc_valid=0.8460\n",
      "epoch=441, train_loss=0.3436,valid_loss=0.4701,, acc_train=0.8803,acc_valid=0.8460\n",
      "epoch=442, train_loss=0.3435,valid_loss=0.4701,, acc_train=0.8802,acc_valid=0.8459\n",
      "epoch=443, train_loss=0.3434,valid_loss=0.4700,, acc_train=0.8804,acc_valid=0.8459\n",
      "epoch=444, train_loss=0.3433,valid_loss=0.4700,, acc_train=0.8804,acc_valid=0.8459\n",
      "epoch=445, train_loss=0.3432,valid_loss=0.4700,, acc_train=0.8804,acc_valid=0.8458\n",
      "epoch=446, train_loss=0.3431,valid_loss=0.4699,, acc_train=0.8805,acc_valid=0.8458\n",
      "epoch=447, train_loss=0.3430,valid_loss=0.4699,, acc_train=0.8805,acc_valid=0.8458\n",
      "epoch=448, train_loss=0.3429,valid_loss=0.4699,, acc_train=0.8805,acc_valid=0.8459\n",
      "epoch=449, train_loss=0.3428,valid_loss=0.4699,, acc_train=0.8805,acc_valid=0.8460\n",
      "epoch=450, train_loss=0.3427,valid_loss=0.4698,, acc_train=0.8805,acc_valid=0.8460\n",
      "epoch=451, train_loss=0.3426,valid_loss=0.4698,, acc_train=0.8806,acc_valid=0.8459\n",
      "epoch=452, train_loss=0.3425,valid_loss=0.4698,, acc_train=0.8807,acc_valid=0.8460\n",
      "epoch=453, train_loss=0.3424,valid_loss=0.4698,, acc_train=0.8807,acc_valid=0.8461\n",
      "epoch=454, train_loss=0.3423,valid_loss=0.4697,, acc_train=0.8808,acc_valid=0.8461\n",
      "epoch=455, train_loss=0.3422,valid_loss=0.4697,, acc_train=0.8808,acc_valid=0.8461\n",
      "epoch=456, train_loss=0.3421,valid_loss=0.4697,, acc_train=0.8808,acc_valid=0.8461\n",
      "epoch=457, train_loss=0.3420,valid_loss=0.4697,, acc_train=0.8808,acc_valid=0.8462\n",
      "epoch=458, train_loss=0.3419,valid_loss=0.4696,, acc_train=0.8808,acc_valid=0.8460\n",
      "epoch=459, train_loss=0.3418,valid_loss=0.4696,, acc_train=0.8808,acc_valid=0.8459\n",
      "epoch=460, train_loss=0.3417,valid_loss=0.4696,, acc_train=0.8809,acc_valid=0.8461\n",
      "epoch=461, train_loss=0.3417,valid_loss=0.4696,, acc_train=0.8809,acc_valid=0.8460\n",
      "epoch=462, train_loss=0.3416,valid_loss=0.4696,, acc_train=0.8809,acc_valid=0.8461\n",
      "epoch=463, train_loss=0.3415,valid_loss=0.4695,, acc_train=0.8809,acc_valid=0.8461\n",
      "epoch=464, train_loss=0.3414,valid_loss=0.4695,, acc_train=0.8810,acc_valid=0.8461\n",
      "epoch=465, train_loss=0.3413,valid_loss=0.4695,, acc_train=0.8810,acc_valid=0.8460\n",
      "epoch=466, train_loss=0.3412,valid_loss=0.4695,, acc_train=0.8809,acc_valid=0.8460\n",
      "epoch=467, train_loss=0.3411,valid_loss=0.4695,, acc_train=0.8810,acc_valid=0.8460\n",
      "epoch=468, train_loss=0.3410,valid_loss=0.4694,, acc_train=0.8810,acc_valid=0.8459\n",
      "epoch=469, train_loss=0.3409,valid_loss=0.4694,, acc_train=0.8811,acc_valid=0.8458\n",
      "epoch=470, train_loss=0.3408,valid_loss=0.4694,, acc_train=0.8810,acc_valid=0.8459\n",
      "epoch=471, train_loss=0.3407,valid_loss=0.4694,, acc_train=0.8811,acc_valid=0.8459\n",
      "epoch=472, train_loss=0.3406,valid_loss=0.4694,, acc_train=0.8811,acc_valid=0.8460\n",
      "epoch=473, train_loss=0.3406,valid_loss=0.4694,, acc_train=0.8812,acc_valid=0.8459\n",
      "epoch=474, train_loss=0.3405,valid_loss=0.4693,, acc_train=0.8812,acc_valid=0.8459\n",
      "epoch=475, train_loss=0.3404,valid_loss=0.4693,, acc_train=0.8812,acc_valid=0.8458\n",
      "epoch=476, train_loss=0.3403,valid_loss=0.4693,, acc_train=0.8813,acc_valid=0.8459\n",
      "epoch=477, train_loss=0.3402,valid_loss=0.4693,, acc_train=0.8813,acc_valid=0.8460\n",
      "epoch=478, train_loss=0.3401,valid_loss=0.4693,, acc_train=0.8814,acc_valid=0.8461\n",
      "epoch=479, train_loss=0.3400,valid_loss=0.4693,, acc_train=0.8814,acc_valid=0.8462\n",
      "epoch=480, train_loss=0.3399,valid_loss=0.4693,, acc_train=0.8815,acc_valid=0.8462\n",
      "epoch=481, train_loss=0.3398,valid_loss=0.4692,, acc_train=0.8815,acc_valid=0.8461\n",
      "epoch=482, train_loss=0.3398,valid_loss=0.4692,, acc_train=0.8815,acc_valid=0.8461\n",
      "epoch=483, train_loss=0.3397,valid_loss=0.4692,, acc_train=0.8815,acc_valid=0.8460\n",
      "epoch=484, train_loss=0.3396,valid_loss=0.4692,, acc_train=0.8815,acc_valid=0.8461\n",
      "epoch=485, train_loss=0.3395,valid_loss=0.4692,, acc_train=0.8815,acc_valid=0.8461\n",
      "epoch=486, train_loss=0.3394,valid_loss=0.4692,, acc_train=0.8815,acc_valid=0.8461\n",
      "epoch=487, train_loss=0.3393,valid_loss=0.4692,, acc_train=0.8815,acc_valid=0.8460\n",
      "epoch=488, train_loss=0.3392,valid_loss=0.4691,, acc_train=0.8816,acc_valid=0.8460\n",
      "epoch=489, train_loss=0.3392,valid_loss=0.4691,, acc_train=0.8816,acc_valid=0.8460\n",
      "epoch=490, train_loss=0.3391,valid_loss=0.4691,, acc_train=0.8817,acc_valid=0.8461\n",
      "epoch=491, train_loss=0.3390,valid_loss=0.4691,, acc_train=0.8817,acc_valid=0.8461\n",
      "epoch=492, train_loss=0.3389,valid_loss=0.4691,, acc_train=0.8818,acc_valid=0.8460\n",
      "epoch=493, train_loss=0.3388,valid_loss=0.4691,, acc_train=0.8818,acc_valid=0.8460\n",
      "epoch=494, train_loss=0.3387,valid_loss=0.4691,, acc_train=0.8819,acc_valid=0.8461\n",
      "epoch=495, train_loss=0.3387,valid_loss=0.4691,, acc_train=0.8819,acc_valid=0.8464\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch=496, train_loss=0.3386,valid_loss=0.4690,, acc_train=0.8818,acc_valid=0.8465\n",
      "epoch=497, train_loss=0.3385,valid_loss=0.4690,, acc_train=0.8819,acc_valid=0.8464\n",
      "epoch=498, train_loss=0.3384,valid_loss=0.4690,, acc_train=0.8819,acc_valid=0.8464\n",
      "epoch=499, train_loss=0.3383,valid_loss=0.4690,, acc_train=0.8820,acc_valid=0.8464\n",
      "epoch=500, train_loss=0.3383,valid_loss=0.4690,, acc_train=0.8820,acc_valid=0.8463\n"
     ]
    }
   ],
   "source": [
    "for epoch in range(training_epochs):\n",
    "    for step in range(total_step):\n",
    "#         print(step)\n",
    "        xs = x_train[step*batch_size:(step+1)*batch_size]\n",
    "        ys = y_train[step*batch_size:(step+1)*batch_size]\n",
    "        \n",
    "        grads = grad(xs,ys,W,B) #计算梯度\n",
    "        optimizer.apply_gradients(zip(grads,[W,B])) # 优化器根据WB 自动调整\n",
    "        \n",
    "    loss_train = loss(x_train,y_train,W,B).numpy() # 计算训练损失\n",
    "    loss_valid = loss(x_valid,y_valid,W,B).numpy()# 验证损失\n",
    "    acc_train = accuracy(x_train,y_train,W,B).numpy() # 计算训练损失\n",
    "    acc_valid = accuracy(x_valid,y_valid,W,B).numpy()# 验证损失\n",
    "    loss_list_train.append(loss_train)\n",
    "    loss_list_valid.append(loss_valid)\n",
    "    acc_list_train.append(acc_train)\n",
    "    acc_list_valid.append(acc_valid)\n",
    "    print(\"epoch={:3d}, train_loss={:.4f},valid_loss={:.4f},, acc_train={:.4f},acc_valid={:.4f}\".format(\n",
    "        epoch+1,loss_train,loss_valid,acc_train,acc_valid))\n",
    "   \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "id": "ea8d7cf5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x218097508c8>"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAkzUlEQVR4nO3deXhdZbn38e+duemYpqmUtpAWEUoH0lJKOQUpgxwGBTmMAgochBePyuTFC+oRRV/PgfdwBBGEg4KiIopFBrVaGQo4ANKWFgpFaaHagZK2tGlDm5LhPn88azc7yU6aNllZSdbvc13r2mvae98rlPzyrGetZ5m7IyIi6ZWXdAEiIpIsBYGISMopCEREUk5BICKScgoCEZGUK0i6gN01YsQIr6ysTLoMEZE+ZeHChRvcvSLXtj4XBJWVlSxYsCDpMkRE+hQz+3t723RqSEQk5RQEIiIppyAQEUm5PtdHICL9U319PatXr6auri7pUvq0kpISxowZQ2FhYaffoyAQkV5h9erVDB48mMrKSsws6XL6JHdn48aNrF69mnHjxnX6fTo1JCK9Ql1dHeXl5QqBLjAzysvLd7tVpSAQkV5DIdB1e/IzTE0QLF0K118P1dVJVyIi0rukJgi2/OAhvviNAdQ8vyzpUkSkF9q8eTPf/e539+i9J510Eps3b+70/l/72te4+eab9+i74pCaIMgzZwB1NNU3Jl2KiPRCHQVBQ0NDh++dO3cuw4YNi6GqnpGaILD8cKjeoCAQkbauu+46VqxYQVVVFddccw1PP/00Rx55JKeccgoHHXQQAB//+Mc55JBDmDhxInfffffO91ZWVrJhwwZWrlzJhAkTuOSSS5g4cSLHH38827dv7/B7Fy9ezMyZM5kyZQqnnXYamzZtAuC2227joIMOYsqUKZxzzjkAPPPMM1RVVVFVVcXUqVPZunVrtxx7ai4ftYJ8AJoamhKuRER25corYfHi7v3Mqiq49db2t994440sXbqUxdEXP/300yxatIilS5fuvBTz3nvvZfjw4Wzfvp1DDz2U008/nfLy8haf88Ybb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FWA78AiiO1pdEy8uj7eOTPoYuHPts4NdpON7o+JZE06uZ31Vx/9vWEBMiIimXllNDIiLSDgWBiEjKKQhERFJOQSAiknIKAhGRlFMQiMTMzGZnRs8U6Y0UBCIiKacgEImY2fnRmP+Lzex/okHeas3slugZAE+aWUW0b5WZPR+NAf9w1vjwHzSzJ6LnBiwys/2ijx9kZnPM7HUzuz+6Oxozu9HCcxVeNrObEzp0STkFgQhgZhOAs4FZ7l4FNALnAQOBBe4+EXgG+Gr0lh8B17r7FMIdnZn19wN3eHhuwD8R7vqGMELqlYTnYYwHZplZOXAaMDH6nP8X5zGKtEdBIBIcCxwCvBgN9Xws4Rd2E/DzaJ+fAEeY2VBgmLs/E62/D/hwNEbMaHd/GMDd69x9W7TPX9x9tbs3EYbEqCQMlVwH3GNm/wJk9hXpUQoCkcCA+zw8FarK3Q9w96/l2G9Px2TZkTXfSHi4SgNhZMk5wEeB3+3hZ4t0iYJAJHgSOCMaAz7zjNh9Cf+PZEa7PBf4o7vXAJvM7Mho/SeBZ9x9K7DazD4efUaxmZW294XR8xSGuvtc4Crg4BiOS2SX9GAaEcDdXzOzfyc8GSqPMJrrZ4H3gBnRtmpCPwKEoYDvin7RvwlcFK3/JPA/Zvb16DPO7OBrBwOPmlkJoUVydTcflkinaPRRkQ6YWa27D0q6DpE46dSQiEjKqUUgIpJyahGIiKScgkBEJOUUBCIiKacgEBFJOQWBiEjK/S8G5mrsT54vEQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.xlabel(\"epochs\")\n",
    "plt.ylabel(\"loss\")\n",
    "plt.plot(loss_list_train,'blue',label = \"train loss\")\n",
    "plt.plot(loss_list_valid,'red',label = \"valid loss\")\n",
    "plt.legend(loc=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "id": "21619866",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x2180975c708>"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEJCAYAAACZjSCSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAnE0lEQVR4nO3deXwV9b3/8dcne0IigbAKVFAQcEWNlFZrKb1UXIq7uNTbeltp3W29/blVpTx8aBe9bfV6r0uvt1btxUpVUFGKG9pWlFApRQKIChIWCZBAAtnP9/fHdw45CQcMgclJMu/n4zGPc87MZM5nQvh+5rvMd8w5h4iIRFdaqgMQEZHUUiIQEYk4JQIRkYhTIhARiTglAhGRiFMiEBGJuFATgZlNMrMVZrbKzG5Osv0QM3vNzJaY2ZtmNjjMeEREZHcW1n0EZpYOrAQmAmXAQuBi59yyhH2eAV50zj1uZhOAy51zl4USkIiIJJUR4rHHAquccx8DmNkM4CxgWcI+RwA/Ct6/ATz/eQft06ePGzp06AENVESku1u0aNFm51zfZNvCTASDgLUJn8uAL7ba5x/AucBvgHOAAjMrcs5t2dNBhw4dSklJyYGOVUSkWzOzNXvalurO4n8Hvmpm7wNfBdYBTa13MrOpZlZiZiXl5eUdHaOISLcWZiJYBwxJ+Dw4WLeLc269c+5c59xxwG3BusrWB3LOPeKcK3bOFfftm7RmIyIi7RRmIlgIjDCzYWaWBVwEzE7cwcz6mFk8hluAx0KMR0REkgitj8A512hm1wBzgXTgMefcB2Y2HShxzs0GxgP3mJkD3gKuDiseEek6GhoaKCsro7a2NtWhdDk5OTkMHjyYzMzMNv9MaMNHw1JcXOzUWSzSvX3yyScUFBRQVFSEmaU6nC7DOceWLVuoqqpi2LBhLbaZ2SLnXHGyn0t1Z7GIyG5qa2uVBNrBzCgqKtrnmpQSgYh0Sk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jgCbgUqAHUOKcOxKYD9wZ/MjvgZucc8fg7+iMr38KeND55wZ8GX/XN/gZUm/APw/jUOAkMysCzgGODI5zV5jnKLInSgQi3teBE4CFwVTPX8cX2DHg6WCfJ4GTzawnUOicmx+sfxw4JZgjZpBz7jkA51ytc25nsM97zrky51wMPyXGUPxUybXA/5jZuUB8X5EOpUQg4hnwuPNPhRrjnBvpnJuWZL/2zslSl/C+Cf9wlUb8zJIzgTOBV9p5bJH9okQg4r0GnB/MAR9/Ruwh+P8j8dkuLwH+4pzbBlSY2VeC9ZcB851zVUCZmZ0dHCPbzPL29IXB8xR6OufmAD8Ejg3hvEQ+lx5MIwI455aZ2U/wT4ZKw8/mejWwAxgbbNuE70cAPxXwQ0FB/zFwebD+MuBhM5seHOOCvXxtATDLzHLwNZIfHeDTEmkTzT4qshdmVu2cy091HCJhUtOQiEjEqUYgIhJxqhGIiEScEoGISMQpEYiIRJwSgYhIxCkRiIhEnBKBiEjE/X/IzWdmwfJZKwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.xlabel(\"epochs\")\n",
    "plt.ylabel(\"acc\")\n",
    "plt.plot(acc_list_train,'blue',label = \"train acc\")\n",
    "plt.plot(acc_list_valid,'red',label = \"valid acc\")\n",
    "plt.legend(loc=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "248ecfa2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "TEST acc: 0.8378\n"
     ]
    }
   ],
   "source": [
    "acc_test = accuracy(x_test,y_test,W,B).numpy()\n",
    "print(\"TEST acc:\",acc_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0d7b6680",
   "metadata": {},
   "source": [
    "# 预测\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "b1c200c8",
   "metadata": {},
   "outputs": [],
   "source": [
    "def predict (x,w,b):\n",
    "    pred = model(x,w,b) \n",
    "    res = tf.argmax(pred,1).numpy() #argmax 返回下标\n",
    "    return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "8f1b9fdb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pred_test = predict(x_test,W,B)\n",
    "pred_test[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "id": "f64ed899",
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_img_lab_pred(images,labels,preds,index=0,num=10):\n",
    "    fig = plt.gcf()\n",
    "    fig.set_size_inches(10,4)\n",
    "    if(num>10):\n",
    "        num = 10\n",
    "    for i in range(0,num):\n",
    "        ax = plt.subplot(2,5,i+1)\n",
    "        ax.imshow(np.reshape(images[index],(28,28)),cmap='binary')\n",
    "        \n",
    "        title = \"label=\"+str(labels[index])\n",
    "        if(len(preds)>0):\n",
    "            title += \",predict=\"+str(preds[index])\n",
    "            \n",
    "        ax.set_title(title,fontsize=10)\n",
    "        ax.set_xticks([])\n",
    "        ax.set_yticks([])\n",
    "        index = index +1\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "9e270db3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAj8AAAD2CAYAAAA51OZiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAABICUlEQVR4nO2debxe073/P19DawgSEsSQwZCmxphJzTNXqVavqhqi2qu4pnLd+9Pb20u1hqtVNNXbKm5L0VbNqqZEEEEiA0mQSIihJIiSmq3fH88+K5/1dZ6V5znnOec5z9mf9+vl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j0Z5/vz5UfZVifmY3gbK9lHv08HtuuKKKxLdWWedFWXvY+TDrMWSqebf4X20brnllqrHuPHGG6O81157JTpOP+BDN9ddd90ojx07NtFxWKeH0/43A352gU+noa+2by6c35ML57/tttui7KtCc7qJI488Msrnnntush/f+5yPj08zUGsbRW08++yzUR4wYECi8+NuGxxSDaT95/vSp6UQn4Z9FoHUn8b73fA77O81+9v68Yv9bvh3vn9YlxsvPvjgg6rt8uUt+Br8M+W/vY1EKz9CCCGEKBWa/AghhBCiVHT7+vzcuXOT7WrVZAHg8MMPj/J5552X6Dg0z4fVsWmNw95fe+21ZL8pU6ZEebPNNkt0uWU6DpH3Ifi8TOdNdWULc+5K7rvvvmR79uzZUeYQXCDNDMpZvQHgpptuirLPZppb/t1xxx3bPTcA3HrrrVH+xje+kejazDRd+SywOQlIM1fvsssuiS5nEusoHMK+7bbbJjp+r9ZZZ50o+yy2bB47+OCDE91KK60UZT9msBmso/dYofSLYZOLN2XwfWK3AZ96hM0tfqx+8cUXG9LO3owfX/iZ9884pxnw95rN8TnTE+/nj8H97I/B+N/l9uV31rsM+G9oI9HKjxBCCCFKhSY/QgghhCgVmvwIIYQQolR0u8+P953gyucLFy5MdByGu+GGGyY6tiH6FOlsm+awS+9vxGG4X/jCFxId/85XHmafA19mgf2BfDgh2y99GHxXhvRVo5pPBNvyczblekKJub98WoHccdhH5Mc//nGU/X3ne73mmmsmul/+8pdR3mabbRId3/fdd9890a266qpRfvDBBxMdp1DwfkR/+tOfoux9ftps2o32K/nkk09iKgXvR8FpAPxzx+VY+HqB9N74kgUvvPBClK+88spEx/ef328g9Yc66KCDouzf/TvuuCPK/v3mNAc+dcHgwYPREdjvwF8r+y+ULXx+woQJUfZ+HNX8q+opbTBw4MAo+/I/G2ywQQda3Pt49dVXk21+p/xYWqsfju8H3uZj+HeB9/P9zPt6vy9uZz1jH3+zfZocX9G+XrTyI4QQQohSocmPEEIIIUpFt5i92AzlwyV56cybfnJh47xM7pe6Wcfh7f4YW2y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GnLyZffnxxx8n22++uTiP4Pvvv5/oPvOZxWWEuB98n/Dv3nvvvUS31FKL5/jc5wCwxhprRHmFFVZYYtsbRSP7Emidd3PhwoVRXnHFFaO8aNGiZD/u308+SSPLuT/79UtyojWN3vJuit7Tl//4R5phY968eVHu27dvolt11VWjvOyy1Wv2fvDBB1F+9dVXEx2PwYMGDUp0PI53NxMnTlwQQhjg/72uyc+QIUPw+OOPN65V3cwbb7yRbPPHbrnllkt0PPj6SVPu4ehKtt66cYXem9mXb731VrL9hz/8Icpz585NdOuuuzgf14cfftiuDADPPPNMuzIArLTS4lyEfoJz+umnR3nLLbu8wHGkkX0JtM67edNNN0V52223jfKjj6Y583iQ9ZPZz372s1E+9NBDG9zCjtFb3k3Re/rSn5fHui9+8YuJ7mtfi0ntsdZaa1U95gsvvBDliy++ONHNmjUrypdeemmia+Zk3syeb+/fG5HksFu44IILku3zzz8/ygMHpvXdnn9+8bX26bM4OMgPovxX6Morr5zoeNt/aHfdddcoX3fddUtouQCAKVOmRPnb304znfNfJLwSAwCHH744F+HYsWOjfNtttyX7jRo1Ksr84QTSfvZ/8Zx22mlRPvbYNMP9YYctzs3lV4x6I341jVdc/Gonr754dtxxcXUS/xfggw8uzpW2zDKLhx9/bv6r8t133010++23uCrJtddem+jOPntx6qfNN9880fF77Pszdz1C9CT4Ob7ssssS3V/+sjhZNX8HgXRSc9FFFyW6c889N8q8msrvKAC88sriihqf//znEx3/YbnbbmmS6e233z7KX/rSlxJds/6A0RsvhBBCiFKhyY8QQgghSoUmP0IIIYQoFS3j8+Ntj3vvvXeU2WcESP182LnW+/z0798/ymuvvXai22677aI8Z86cRNedjrGtxC233BLlMWPGJDr25WFHVwBYbbXVouwjFNhXiH1Jdt9992Q/dmr2z8o777wTZY5qAFJ/sbvuSkupPfDAA1HeZJM02elJJ52E3ob366nVz8lHaj322GNRXn755RPd/vvvH+WHHnooyi+++GKyH99vdnAGUp8f9iECUod57/PTrEAFITrDpEmTku1zzjknyq+//nqi47HP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MDiEMWPJuS0Z92XQa1peA+rMHoHez96C+7F202591TX6EEEIIIVodmb2EEEIIUSo0+RFCCCFEqdDkRwghhBClQpMfIYQQQpQKTX6EEEIIUSo0+RFCCCFEqdDkRwghhBClQpMfIYQQQpQKTX6EEEIIUSr+P6N77c9N6OI8AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 720x288 with 10 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plot_img_lab_pred(test_images,test_labels,pred_test,10,10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9a54c660",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
